Fixed patches, cleaned up Makefile, added dependencies
This commit is contained in:
18
Makefile
18
Makefile
@@ -8,13 +8,13 @@
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
DEPENDS =
|
||||
DEPENDS = acl,attr,glibc
|
||||
ARCH = x86_64
|
||||
URL = http://pkg-shadow.alioth.debian.org/
|
||||
DESC = This package includes the programs necessary to convert traditional \
|
||||
V7 UNIX password files to the SVR4 shadow password format and additional \
|
||||
tools to work with shadow passwords.
|
||||
SNAPVER = sr1
|
||||
SNAPVER = sr3
|
||||
|
||||
ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1)
|
||||
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
|
||||
VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')$(SNAPVER)
|
||||
|
||||
MAKE = make
|
||||
MAKEINST = make install
|
||||
SNAPHACKS =
|
||||
|
||||
include /usr/share/snap/Makefile.snaplinux
|
||||
|
||||
$(SRCDIR)/configure: $(ARCHIVE)
|
||||
@@ -44,7 +40,9 @@ $(SRCDIR)/configure: $(ARCHIVE)
|
||||
@touch $(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; \
|
||||
done
|
||||
@cd $(SRCDIR); \
|
||||
@@ -56,8 +54,7 @@ $(SRCDIR)/config.log: $(SRCDIR)/configure
|
||||
--target=x86_64-snap-linux-gnu
|
||||
|
||||
$(SRCDIR)/src/vipw: $(SRCDIR)/config.log
|
||||
@cd $(SRCDIR); \
|
||||
$(MAKE)
|
||||
@cd $(SRCDIR) && make
|
||||
|
||||
$(ROOT): $(SRCDIR)/src/vipw
|
||||
@if [ -d $(ROOT) ]; then \
|
||||
@@ -66,8 +63,7 @@ $(ROOT): $(SRCDIR)/src/vipw
|
||||
mkdir -v $(ROOT); \
|
||||
fi
|
||||
|
||||
@cd $(SRCDIR); \
|
||||
$(MAKEINST) DESTDIR=$(ROOT)
|
||||
@cd $(SRCDIR) && make install DESTDIR=$(ROOT)
|
||||
|
||||
@$(SNAPHACKS)
|
||||
|
||||
|
||||
@@ -9,18 +9,22 @@ case $1 in
|
||||
postinst)
|
||||
if [[ ${TARGET} ]]; then
|
||||
if [ ! -f ${TARGET}/etc/shadow ]; then
|
||||
echo "Converting /etc/passwd to shadow for ${TARGET}"
|
||||
chroot ${TARGET} pwconv
|
||||
fi
|
||||
|
||||
if [ ! -f ${TARGET}/etc/gshadow ]; then
|
||||
echo "Converting /etc/group to gshadow for ${TARGET}"
|
||||
chroot ${TARGET} grpconv
|
||||
fi
|
||||
else
|
||||
if [ ! -f /etc/shadow ]; then
|
||||
echo "Converting /etc/passwd to shadow"
|
||||
pwconv
|
||||
fi
|
||||
|
||||
if [ ! -f /etc/gshadow ]; then
|
||||
echo "Converting /etc/group to gshadow for ${TARGET}"
|
||||
grpconv
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -1,21 +1,12 @@
|
||||
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
|
||||
|
||||
#
|
||||
diff -Naur a/etc/login.defs b/etc/login.defs
|
||||
--- a/etc/login.defs 2014-05-09 05:20:28.000000000 -0500
|
||||
+++ b/etc/login.defs 2016-11-02 23:27:40.712000000 -0500
|
||||
@@ -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
|
||||
-#ENCRYPT_METHOD DES
|
||||
+ENCRYPT_METHOD SHA512
|
||||
|
||||
#
|
||||
# Only works if ENCRYPT_METHOD is set to SHA256 or SHA512.
|
||||
|
||||
21
SRC/patches/03_use-sha512.patch.old
Normal file
21
SRC/patches/03_use-sha512.patch.old
Normal 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.
|
||||
12
SRC/patches/04_mailpath.patch
Normal file
12
SRC/patches/04_mailpath.patch
Normal 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
|
||||
|
||||
#
|
||||
Reference in New Issue
Block a user