-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1732 from flatcar/krnowak/crypt
Migrate from glibc libcrypt to sys-libs/libxcrypt
- Loading branch information
Showing
15 changed files
with
1,052 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- libcrypt is now provided by the libxcrypt library instead of glibc. Glibc libcrypt was deprecated long time ago. |
19 changes: 19 additions & 0 deletions
19
...ner/src/third_party/coreos-overlay/coreos/stage1_hooks/0000-glibc-crypt-portage-stable.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
set -x | ||
set -euo pipefail | ||
|
||
stage1_repo=${1} | ||
new_repo=${2} | ||
update_seed_file=${3} | ||
|
||
cat=sys-libs | ||
pkg=libxcrypt | ||
|
||
if [[ -d "${stage1_repo}/${cat}/${pkg}" ]]; then | ||
# libxcrypt is already a part of portage-stable, nothing to do | ||
exit 0 | ||
fi | ||
|
||
mkdir -p "${stage1_repo}/${cat}" | ||
cp -a "${new_repo}/${cat}/${pkg}" "${stage1_repo}/${cat}/${pkg}" | ||
echo x >"${update_seed_file}" |
53 changes: 53 additions & 0 deletions
53
...ner/src/third_party/coreos-overlay/coreos/stage1_hooks/0002-glibc-crypt-coreos-overlay.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/bin/bash | ||
set -x | ||
set -euo pipefail | ||
|
||
stage1_repo=${1} | ||
new_repo=${2} | ||
update_seed_file=${3} | ||
|
||
base_profile_dir='profiles/coreos/base' | ||
|
||
declare -A fixups_old=( | ||
['package.mask']='>=virtual/libcrypt-2' | ||
['package.unmask']='=virtual/libcrypt-1-r1' | ||
['package.use.force']='sys-libs/glibc crypt' | ||
['package.use.mask']='sys-libs/glibc -crypt' | ||
) | ||
|
||
declare -A fixups_new=( | ||
['package.mask']='>=virtual/libcrypt-2' | ||
['package.unmask']='<virtual/libcrypt-2' | ||
['package.use.force']='sys-libs/glibc crypt' | ||
['package.use.mask']='sys-libs/glibc -crypt' | ||
) | ||
|
||
for var_name in fixups_old fixups_new; do | ||
declare -n fixups="${var_name}" | ||
|
||
skip='' | ||
for f in "${!fixups[@]}"; do | ||
l=${fixups["${f}"]} | ||
ff="${stage1_repo}/${base_profile_dir}/${f}" | ||
if ! grep --quiet --fixed-strings --line-regexp --regexp="${l}" -- "${ff}"; then | ||
# fixup not applicable, try next one | ||
skip=x | ||
break | ||
fi | ||
done | ||
|
||
if [[ -n ${skip} ]]; then | ||
unset -n fixups | ||
continue | ||
fi | ||
|
||
for f in "${!fixups[@]}"; do | ||
l=${fixups["${f}"]} | ||
ff="${stage1_repo}/${base_profile_dir}/${f}" | ||
ffb="${ff}.bak" | ||
mv "${ff}" "${ffb}" | ||
grep --invert-match --fixed-strings --line-regexp --regexp="${l}" -- "${ffb}" >"${ff}" | ||
done | ||
echo x >"${update_seed_file}" | ||
exit 0 | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.unmask
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
sdk_container/src/third_party/portage-stable/sys-libs/libxcrypt/Manifest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DIST libxcrypt-4.4.36-autotools.tar.xz 624660 BLAKE2B 8dc3d0f354baf8c64dc011e95e7df10d48b0dfe428503936ffd55edf2745de04003c7efe231ed5d9a14cea7f682ba377b7e00f0463b4060c50c9c29f555b790f SHA512 fb8391ecb89622eb0d74d13c5fc1369718e83c47671449044ca0c2f78a236d7b06177a60bf8cda47694caa840c68eaaf0b23690e8975fa5d64b734c8eb246d10 |
14 changes: 14 additions & 0 deletions
14
...src/third_party/portage-stable/sys-libs/libxcrypt/files/libxcrypt-4.4.19-multibuild.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff --git a/Makefile.am b/Makefile.am | ||
index d0cca1d..4a5d4a1 100644 | ||
--- a/Makefile.am | ||
+++ b/Makefile.am | ||
@@ -86,9 +86,7 @@ noinst_HEADERS = \ | ||
test/des-cases.h \ | ||
test/ka-table.inc | ||
|
||
-if ENABLE_XCRYPT_COMPAT_FILES | ||
nodist_include_HEADERS += xcrypt.h | ||
-endif | ||
|
||
noinst_PROGRAMS = \ | ||
lib/gen-des-tables |
Oops, something went wrong.