Fixed patches, cleaned up Makefile, added dependencies

This commit is contained in:
2016-11-02 23:34:05 -05:00
parent 653de8f1c6
commit 3628b9971f
5 changed files with 49 additions and 25 deletions

View File

@@ -8,13 +8,13 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
DEPENDS = DEPENDS = acl,attr,glibc
ARCH = x86_64 ARCH = x86_64
URL = http://pkg-shadow.alioth.debian.org/ URL = http://pkg-shadow.alioth.debian.org/
DESC = This package includes the programs necessary to convert traditional \ DESC = This package includes the programs necessary to convert traditional \
V7 UNIX password files to the SVR4 shadow password format and additional \ V7 UNIX password files to the SVR4 shadow password format and additional \
tools to work with shadow passwords. tools to work with shadow passwords.
SNAPVER = sr1 SNAPVER = sr3
ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1) ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1)
TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n') TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n')
@@ -22,10 +22,6 @@ SRCDIR := $(shell tar -tf $(ARCHIVE)|head -1|sed 's/\/.*//')
PATCHDIR := $(PWD)/SRC/patches PATCHDIR := $(PWD)/SRC/patches
VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')$(SNAPVER) VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')$(SNAPVER)
MAKE = make
MAKEINST = make install
SNAPHACKS =
include /usr/share/snap/Makefile.snaplinux include /usr/share/snap/Makefile.snaplinux
$(SRCDIR)/configure: $(ARCHIVE) $(SRCDIR)/configure: $(ARCHIVE)
@@ -44,7 +40,9 @@ $(SRCDIR)/configure: $(ARCHIVE)
@touch $(SRCDIR)/configure @touch $(SRCDIR)/configure
$(SRCDIR)/config.log: $(SRCDIR)/configure $(SRCDIR)/config.log: $(SRCDIR)/configure
@cd $(SRCDIR) && for patch in `find $(PATCHDIR) -name \*.patch`; do \ @cd $(SRCDIR) && \
for patch in `find $(PATCHDIR) -name \*.patch|sort`; do \
echo "WTF: $$patch"; \
patch --verbose -Np1 -i $$patch; \ patch --verbose -Np1 -i $$patch; \
done done
@cd $(SRCDIR); \ @cd $(SRCDIR); \
@@ -56,8 +54,7 @@ $(SRCDIR)/config.log: $(SRCDIR)/configure
--target=x86_64-snap-linux-gnu --target=x86_64-snap-linux-gnu
$(SRCDIR)/src/vipw: $(SRCDIR)/config.log $(SRCDIR)/src/vipw: $(SRCDIR)/config.log
@cd $(SRCDIR); \ @cd $(SRCDIR) && make
$(MAKE)
$(ROOT): $(SRCDIR)/src/vipw $(ROOT): $(SRCDIR)/src/vipw
@if [ -d $(ROOT) ]; then \ @if [ -d $(ROOT) ]; then \
@@ -66,8 +63,7 @@ $(ROOT): $(SRCDIR)/src/vipw
mkdir -v $(ROOT); \ mkdir -v $(ROOT); \
fi fi
@cd $(SRCDIR); \ @cd $(SRCDIR) && make install DESTDIR=$(ROOT)
$(MAKEINST) DESTDIR=$(ROOT)
@$(SNAPHACKS) @$(SNAPHACKS)

View File

@@ -9,18 +9,22 @@ case $1 in
postinst) postinst)
if [[ ${TARGET} ]]; then if [[ ${TARGET} ]]; then
if [ ! -f ${TARGET}/etc/shadow ]; then if [ ! -f ${TARGET}/etc/shadow ]; then
echo "Converting /etc/passwd to shadow for ${TARGET}"
chroot ${TARGET} pwconv chroot ${TARGET} pwconv
fi fi
if [ ! -f ${TARGET}/etc/gshadow ]; then if [ ! -f ${TARGET}/etc/gshadow ]; then
echo "Converting /etc/group to gshadow for ${TARGET}"
chroot ${TARGET} grpconv chroot ${TARGET} grpconv
fi fi
else else
if [ ! -f /etc/shadow ]; then if [ ! -f /etc/shadow ]; then
echo "Converting /etc/passwd to shadow"
pwconv pwconv
fi fi
if [ ! -f /etc/gshadow ]; then if [ ! -f /etc/gshadow ]; then
echo "Converting /etc/group to gshadow for ${TARGET}"
grpconv grpconv
fi fi
fi fi

View File

@@ -1,21 +1,12 @@
diff -Naur c/etc/login.defs d/etc/login.defs diff -Naur a/etc/login.defs b/etc/login.defs
--- c/etc/login.defs 2016-10-04 14:54:27.116000000 -0500 --- a/etc/login.defs 2014-05-09 05:20:28.000000000 -0500
+++ d/etc/login.defs 2014-05-09 05:20:28.000000000 -0500 +++ b/etc/login.defs 2016-11-02 23:27:40.712000000 -0500
@@ -118,7 +118,7 @@
# Directory where mailboxes reside, _or_ name of file, relative to the
# home directory. If you _do_ define both, MAIL_DIR takes precedence.
#
-MAIL_DIR /var/mail
+MAIL_DIR /var/spool/mail
#MAIL_FILE .mail
#
@@ -317,7 +317,7 @@ @@ -317,7 +317,7 @@
# Note: If you use PAM, it is recommended to use a value consistent with # Note: If you use PAM, it is recommended to use a value consistent with
# the PAM modules configuration. # the PAM modules configuration.
# #
-ENCRYPT_METHOD SHA512 -#ENCRYPT_METHOD DES
+#ENCRYPT_METHOD DES +ENCRYPT_METHOD SHA512
# #
# Only works if ENCRYPT_METHOD is set to SHA256 or SHA512. # Only works if ENCRYPT_METHOD is set to SHA256 or SHA512.

View File

@@ -0,0 +1,21 @@
diff -Naur c/etc/login.defs d/etc/login.defs
--- c/etc/login.defs 2016-10-04 14:54:27.116000000 -0500
+++ d/etc/login.defs 2014-05-09 05:20:28.000000000 -0500
@@ -118,7 +118,7 @@
# Directory where mailboxes reside, _or_ name of file, relative to the
# home directory. If you _do_ define both, MAIL_DIR takes precedence.
#
-MAIL_DIR /var/mail
+MAIL_DIR /var/spool/mail
#MAIL_FILE .mail
#
@@ -317,7 +317,7 @@
# Note: If you use PAM, it is recommended to use a value consistent with
# the PAM modules configuration.
#
-ENCRYPT_METHOD SHA512
+#ENCRYPT_METHOD DES
#
# Only works if ENCRYPT_METHOD is set to SHA256 or SHA512.

View File

@@ -0,0 +1,12 @@
diff -Naur a/etc/login.defs b/etc/login.defs
--- a/etc/login.defs 2016-11-02 23:27:40.712000000 -0500
+++ b/etc/login.defs 2016-11-02 23:31:00.536000000 -0500
@@ -118,7 +118,7 @@
# Directory where mailboxes reside, _or_ name of file, relative to the
# home directory. If you _do_ define both, MAIL_DIR takes precedence.
#
-MAIL_DIR /var/spool/mail
+MAIL_DIR /var/mail
#MAIL_FILE .mail
#