Skip to content

Commit 706f35f

Browse files
committed
fix for fix_pamd
1 parent cb59077 commit 706f35f

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
NAME = spec-helper
2-
VERSION = 0.31.50
2+
VERSION = 0.31.53
33
GITPATH = [email protected]:OpenMandrivaSoftware/spec-helper.git
44

55
SCRIPT_FILES = clean_files clean_perl check_elf_files \

fix_pamd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ fi
1313
configs=$(find $RPM_BUILD_ROOT/etc/pam.d/ -type f ! -type l 2> /dev/null)
1414
if [ -n "$configs" ]; then
1515
printf '%s\n' "Fixing pam.d config files..."
16-
sed -e 's,/lib64/security/,,g ; s,/lib/security/,,g' $configs
16+
sed -r 's,/(usr/)?(lib|lib64)/security/,,g' $configs
1717
printf '%s\n' "...done"
1818
fi

rediff_patch

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
shopt -s nullglob
1717

18-
spec_count=`ls -1 *spec 2>/dev/null | wc -l`
18+
spec_count=$(ls -1 *spec 2>/dev/null | wc -l)
1919
if [[ $spec_count != 1 ]]; then
2020
echo "Can't detect spec file to work with - current folder either contains no spec files or contains several spec files."
2121
exit
@@ -38,7 +38,7 @@ if [[ $target_patch == '-h' || $target_patch == '--help' ]]; then
3838
fi
3939

4040
# Remember number of patch files in current dir
41-
patch_count=`ls -1 *patch 2>/dev/null | wc -l`
41+
patch_count=$(ls -1 *patch 2>/dev/null | wc -l)
4242

4343
if [[ "${target_patch}" == "" ]]; then
4444
# if no patch is provided as script argument and there is only a single patch in the folder,
@@ -51,7 +51,7 @@ if [[ "${target_patch}" == "" ]]; then
5151
fi
5252
exit 1
5353
else
54-
target_patch=`ls -1 *patch`
54+
target_patch=$(ls -1 *patch)
5555
echo "No patch specified as an argument, processing ${target_patch}"
5656
fi
5757
fi
@@ -63,16 +63,16 @@ if [[ $? == 0 ]]; then
6363
patch_cmd="patch -p1 --force"
6464
elif [[ $patch_count == 1 ]]; then
6565
# only one patch and no %apply_patches, so we can expect the only %patch command in the spec
66-
patch_cmd=`grep '^%patch' *spec | cut -f1,2 -d- | sed 's/^%patch[[:digit:]]*/patch --force /'`
66+
patch_cmd=$(grep '^%patch' *spec | cut -f1,2 -d- | sed 's/^%patch[[:digit:]]*/patch --force /')
6767
else
6868
# grep for Patch: record in spec corresponding to our patch
6969
# drop name from the beginning of the patch name,
7070
# since one can use %name or %{name} in patch name in spec
71-
project=`basename "$PWD"`
72-
patch_num=`grep "^Patch.*${target_patch/$project/}" *spec | sed 's/^Patch\([[:digit:]]*\).*$/\1/'`
71+
project=$(basename "$PWD")
72+
patch_num=$(grep "^Patch.*${target_patch/$project/}" *spec | sed 's/^Patch\([[:digit:]]*\).*$/\1/')
7373

7474
# now grep for necessary %patch command
75-
patch_cmd=`grep "\%patch${patch_num}[[:space:]]\|\%patch${patch_num}\$" *spec | cut -f1,2 -d- | sed 's/^\%patch[[:digit:]]*/patch --force /'`
75+
patch_cmd=$(grep "\%patch${patch_num}[[:space:]]\|\%patch${patch_num}\$" *spec | cut -f1,2 -d- | sed 's/^\%patch[[:digit:]]*/patch --force /')
7676
fi
7777

7878
rm -rf rediff_patch
@@ -128,7 +128,7 @@ fi
128128
# Let's check how many folders exist in the current one after tarball unpacking
129129
# We support only the situation when we have a single folder (except .git)
130130
# which will be subjected to patching then
131-
count=`ls -l | grep -v .git | grep '^d' 2>/dev/null | wc -l`
131+
count=$(ls -l | grep -v .git | grep '^d' 2>/dev/null | wc -l)
132132
if [[ $count != 1 ]]; then
133133
if [[ $count == 0 ]]; then
134134
echo "No folders, something went wrong with unpacking of tarball"
@@ -140,7 +140,7 @@ if [[ $count != 1 ]]; then
140140
fi
141141

142142
# Create folder backup and try to apply the patch
143-
folder=`ls -l | grep '^d' | rev | cut -f1 -d\ | rev`
143+
folder=$(ls -l | grep '^d' | rev | cut -f1 -d\ | rev)
144144
cp -r $folder ${folder}.orig
145145
cp ../$target_patch $folder
146146

spec-cleaner

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ while(<F>) {
259259
$line =~ s/({|%)python3_sitelib/$1py3_puresitedir/g;
260260
$line =~ s/({|%)python_version/$1py_ver/g;
261261
$line =~ s/({|%)pyver/$1py_ver/g;
262-
$line =~ s/\%py_requires -d/BuildRequires: python-devel/;
262+
$line =~ s/\%py_requires -d/BuildRequires: pkgconfig\(python\)/;
263263

264264
foreach $var (@vars) {
265265
$line =~ s/\%$var/\%\{$var\}/g;

0 commit comments

Comments
 (0)