Github messages for voidlinux
 help / color / mirror / Atom feed
From: oreo639 <oreo639@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [WIP] New package: libxcrypt-4.4.33
Date: Wed, 04 Jan 2023 03:34:39 +0100	[thread overview]
Message-ID: <20230104023439.Q6jZcasQYDwr1eDahM4-V4jgoDDzViOS41EGIU4NiJw@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-41431@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1620 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages libxcrypt
https://github.com/void-linux/void-packages/pull/41431

[WIP] New package: libxcrypt-4.4.33
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **NO**

libxcrypt will replace libcrypt on glibc.
`--disable-failure-tokens` as per:
https://github.com/besser82/libxcrypt/issues/25

glibc will need to be compiled with `--disable-crypt`.
musl provides no such option, Debian just rm's libcrypt.a from musl:
https://salsa.debian.org/reiner/musl/-/blob/master/debian/rules#L76

Not sure what we want to do on musl.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/41431.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libxcrypt-41431.patch --]
[-- Type: text/x-diff, Size: 5934 bytes --]

From 679647059ecc4d335eb0f464e14be6e6f909b9e3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 3 Jan 2023 17:50:03 -0800
Subject: [PATCH 1/2] New package: libxcrypt-4.4.33

---
 common/shlibs              |   3 +-
 srcpkgs/libxcrypt-compat   |   1 +
 srcpkgs/libxcrypt-devel    |   1 +
 srcpkgs/libxcrypt/template | 102 +++++++++++++++++++++++++++++++++++++
 4 files changed, 106 insertions(+), 1 deletion(-)
 create mode 120000 srcpkgs/libxcrypt-compat
 create mode 120000 srcpkgs/libxcrypt-devel
 create mode 100644 srcpkgs/libxcrypt/template

diff --git a/common/shlibs b/common/shlibs
index 52a6d3e6d5fb5..bc4e34dc3756b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -40,7 +40,6 @@ libnss_files.so.2 glibc-2.36_1
 libnss_compat.so.2 glibc-2.36_1
 libnss_dns.so.2 glibc-2.36_1
 libnss_hesiod.so.2 glibc-2.36_1
-libcrypt.so.1 glibc-2.36_1
 libBrokenLocale.so.1 glibc-2.36_1
 libSimGearCore.so.2020.3.17 simgear-2020.3.17_1
 libSimGearScene.so.2020.3.17 simgear-2020.3.17_1
@@ -71,6 +70,8 @@ libppl.so.14 ppl-1.2_1
 libppl_c.so.4 ppl-0.11_1
 libstdc++.so.6 libstdc++-4.4.0_1
 libssp.so.0 libssp-4.4.0_1
+libcrypt.so.1 libxcrypt-compat-4.4.33_1
+libcrypt.so.2 libxcrypt-4.4.33_1
 libncurses.so.6 ncurses-libs-6.0_1 ignore
 libncursesw.so.6 ncurses-libs-5.8_1 ignore
 libtinfo.so.6 ncurses-libtinfo-libs-6.2_2
diff --git a/srcpkgs/libxcrypt-compat b/srcpkgs/libxcrypt-compat
new file mode 120000
index 0000000000000..4ed34b8a6a49e
--- /dev/null
+++ b/srcpkgs/libxcrypt-compat
@@ -0,0 +1 @@
+libxcrypt
\ No newline at end of file
diff --git a/srcpkgs/libxcrypt-devel b/srcpkgs/libxcrypt-devel
new file mode 120000
index 0000000000000..4ed34b8a6a49e
--- /dev/null
+++ b/srcpkgs/libxcrypt-devel
@@ -0,0 +1 @@
+libxcrypt
\ No newline at end of file
diff --git a/srcpkgs/libxcrypt/template b/srcpkgs/libxcrypt/template
new file mode 100644
index 0000000000000..35132895cddfa
--- /dev/null
+++ b/srcpkgs/libxcrypt/template
@@ -0,0 +1,102 @@
+# Template file for 'libxcrypt'
+pkgname=libxcrypt
+version=4.4.33
+revision=1
+configure_args="--enable-hashes=all --disable-failure-tokens"
+hostmakedepends="perl"
+checkdepends="python3-passlib"
+short_desc="Modern library for one-way hashing of passwords"
+maintainer="oreo639 <oreo639@gmail.com>"
+license="LGPL-2.1-or-later, BSD-3-Clause, BSD-2-Clause, 0BSD, Public Domain"
+homepage="https://github.com/besser82/libxcrypt"
+distfiles="https://github.com/besser82/libxcrypt/releases/download/v${version}/libxcrypt-${version}.tar.xz"
+checksum=e87acf9c652c573a4713d5582159f98f305d56ed5f754ce64f57d4194d6b3a6f
+subpackages="libxcrypt-devel"
+build_options="compat"
+build_options_default=""
+
+desc_option_compat="Enable glibc compatibility library"
+
+if [ "$XBPS_TARGET_LIBC" = "glibc" ]; then
+build_options_default+=" compat"
+fi
+
+if [ "$build_option_compat" ]; then
+subpackages+=" libxcrypt-compat"
+fi
+
+do_configure() {
+if [ "$build_option_compat" ]; then
+	(
+		mkdir compat-build
+		cd compat-build
+		../configure --prefix=/usr --enable-obsolete-api=glibc ${configure_args}
+	)
+fi
+
+	(
+		mkdir build
+		cd build
+		../configure --prefix=/usr --enable-obsolete-api=no ${configure_args}
+	)
+}
+
+do_build() {
+if [ "$build_option_compat" ]; then
+	(
+		cd compat-build
+		make ${makejobs} ${make_build_args} ${make_build_target}
+	)
+fi
+
+	(
+		cd build
+		make ${makejobs} ${make_build_args} ${make_build_target}
+	)
+}
+
+do_install() {
+if [ "$build_option_compat" ]; then
+	(
+		cd compat-build
+		make DESTDIR=${DESTDIR} install ${make_install_target}
+		rm -r ${DESTDIR}/usr/{include,lib/{lib*.so,pkgconfig},share}
+	)
+fi
+
+	(
+		cd build
+		make DESTDIR=${DESTDIR} install ${make_install_target}
+	)
+}
+
+post_install() {
+	vlicense LICENSING
+}
+
+do_check() {
+	: ${make_check_target:=check}
+if [ "$build_option_compat" ]; then
+	${make_check_pre} make -C compat-build ${makejobs} ${make_check_args} ${make_check_target}
+fi
+	${make_check_pre} make -C build ${makejobs} ${make_check_args} ${make_check_target}
+}
+
+libxcrypt-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/lib/pkgconfig
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+		vmove usr/share
+	}
+}
+
+libxcrypt-compat_package() {
+	short_desc+=" - legacy compatibility"
+	pkg_install() {
+		vmove usr/lib/libcrypt.so.1*
+	}
+}

From bd67dd3a812d41237207e489380918bb45d33a97 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 3 Jan 2023 18:34:06 -0800
Subject: [PATCH 2/2] glibc: disable libcrypt

Remove obsolete flags
---
 srcpkgs/glibc/template | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/glibc/template b/srcpkgs/glibc/template
index 452b55c127624..0966f9b59fc3e 100644
--- a/srcpkgs/glibc/template
+++ b/srcpkgs/glibc/template
@@ -1,7 +1,7 @@
 # Template file for 'glibc'
 pkgname=glibc
 version=2.36
-revision=1
+revision=2
 _patchver="72-g0f90d6204d"
 bootstrap=yes
 short_desc="GNU C library"
@@ -29,7 +29,6 @@ nostrip_files="
 	ld.so.1
 	ld-linux-armhf.so.3
 	libresolv.so.2
-	libcrypt.so.1
 	libm.so.6
 	libthread_db.so.1
 	libnsl.so.1
@@ -98,14 +97,12 @@ do_configure() {
 	SHELL=/bin/bash ../configure ${configure_args} \
 		--bindir=/usr/bin --sbindir=/usr/bin \
 		--libdir=${_libdir} --libexecdir=${_libdir} \
-		--enable-add-ons=libidn \
+		--with-headers=${XBPS_CROSS_BASE}/usr/include \
 		--enable-multi-arch --enable-bind-now \
 		--disable-profile --enable-kernel=3.2.0 \
-		--enable-stack-guard-randomization \
-		--without-selinux --without-cvs --without-gd \
-		--disable-lock-elision \
 		--enable-stack-protector=strong \
-		--with-headers=${XBPS_CROSS_BASE}/usr/include \
+		--enable-stack-guard-randomization \
+		--without-selinux --without-gd --disable-crypt \
 		--disable-werror \
 		libc_cv_rootsbindir=/usr/bin \
 		libc_cv_rtlddir=${_libdir} libc_cv_slibdir=${_libdir}

  parent reply	other threads:[~2023-01-04  2:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-04  2:05 [PR PATCH] " oreo639
2023-01-04  2:05 ` [PR PATCH] [Closed]: " oreo639
2023-01-04  2:20 ` [PR PATCH] [Updated] [WIP] " oreo639
2023-01-04  2:24 ` oreo639
2023-01-04  2:34 ` oreo639 [this message]
2023-01-04  3:05 ` oreo639
2023-05-09  1:53 ` github-actions
2023-05-13  4:56 ` oreo639
2023-08-09 11:24 ` [PR PATCH] [Closed]: " oreo639
2023-08-09 11:24 ` oreo639

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230104023439.Q6jZcasQYDwr1eDahM4-V4jgoDDzViOS41EGIU4NiJw@z \
    --to=oreo639@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).