Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
DarinMao committed Aug 7, 2020
0 parents commit a4c20ce
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bin/
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
BINDIR := bin
SRCDIR := src
TARGETS := $(patsubst $(SRCDIR)/%.sh,$(BINDIR)/%,$(wildcard $(SRCDIR)/*.sh))

all: $(TARGETS)

$(BINDIR)/%: $(SRCDIR)/%.sh
mkdir -p $(BINDIR)
docker run -it -v `pwd`/$(SRCDIR):/src -v `pwd`/$(BINDIR):/out alpine /bin/ash -c '/src/$(<F) && cp /usr/local/sbin/xinetd /out/$(@F)'

clean:
rm -rf $(BINDIR)

.PHONY: all clean
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# xinetd-musl
Standalone xinetd binaries for use in Alpine containers

## Requirements
- make
- docker
18 changes: 18 additions & 0 deletions src/xinetd-musl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/ash

apk add --update build-base git linux-headers bsd-compat-headers

wget https://downloads.sourceforge.net/project/libtirpc/libtirpc/1.2.6/libtirpc-1.2.6.tar.bz2
tar xvjf libtirpc*.tar.bz2
cd libtirpc*
./configure --enable-static --disable-gssapi
make
make install
cd ..

git clone https://github.com/xinetd-org/xinetd
cd xinetd
CFLAGS="-s -I/usr/include/tirpc" CPPFLAGS="-DHAVE_RLIM_T" ./configure
LDFLAGS="-Wl,-Bstatic -ltirpc -Wl,-Bdynamic" make
make install
cd ..
18 changes: 18 additions & 0 deletions src/xinetd-static.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/ash

apk add --update build-base git linux-headers bsd-compat-headers

wget https://downloads.sourceforge.net/project/libtirpc/libtirpc/1.2.6/libtirpc-1.2.6.tar.bz2
tar xvjf libtirpc*.tar.bz2
cd libtirpc*
./configure --enable-static --disable-gssapi
make
make install
cd ..

git clone https://github.com/xinetd-org/xinetd
cd xinetd
CFLAGS="-s -static -I/usr/include/tirpc" CPPFLAGS="-DHAVE_RLIM_T" ./configure
LDFLAGS="-ltirpc" make
make install
cd ..

0 comments on commit a4c20ce

Please sign in to comment.