Enable ASLR/DEP feature
[platform/upstream/e2fsprogs.git] / packaging / e2fsprogs.spec
1 Name:           e2fsprogs
2 BuildRequires:  autoconf
3 BuildRequires:  libblkid-devel
4 BuildRequires:  libuuid-devel
5 BuildRequires:  pkg-config
6 Version:        1.43.4
7 Release:        0
8 Summary:        Utilities for the Second Extended File System
9 License:        GPL-2.0
10 Group:          System/Filesystems
11 Url:            http://e2fsprogs.sourceforge.net
12 Requires:       libcom_err >= %{version}
13 Requires:       libext2fs >= %{version}
14 Source:         http://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/v%{version}/e2fsprogs-%{version}.tar.xz
15 Source1:        baselibs.conf
16 Source2:        e2fsck.conf
17 Source1001:     e2fsprogs.manifest
18
19 %description
20 Utilities needed to create and maintain ext2 and ext3 file systems
21 under Linux. Included in this package are: chattr, lsattr, mke2fs,
22 mklost+found, tune2fs, e2fsck, resize2fs, and badblocks.
23
24 %package devel
25 Summary:        Dummy development package
26 License:        LGPL-2.0
27 Group:          Base/Development
28 Requires:       libblkid-devel
29 Requires:       libext2fs-devel = %version
30 Requires:       libuuid-devel
31
32 %description devel
33 Dummy development package for backwards compatibility.
34
35 %package -n libext2fs
36 Summary:        Ext2fs library
37 License:        LGPL-2.0
38 Group:          Base/File Systems
39
40 %description -n libext2fs
41 The basic Ext2fs shared library.
42
43 %package -n libext2fs-devel
44 Summary:        Development files for libext2fs
45 License:        LGPL-2.0
46 Group:          Base/Development
47 Requires:       libcom_err-devel
48 Requires:       libext2fs = %version
49
50 %description -n libext2fs-devel
51 Development files for libext2fs.
52
53 %package -n libcom_err
54 Summary:        E2fsprogs error reporting library
55 License:        MIT
56 Group:          Base/File Systems
57
58 %description -n libcom_err
59 com_err is an error message display library.
60
61 %package -n libcom_err-devel
62 Summary:        Development files for libcom_err
63 License:        MIT
64 Group:          Base/Development
65 Requires:       glibc-devel
66 Requires:       libcom_err = %version
67
68 %description -n libcom_err-devel
69 Development files for the com_err error message display library.
70
71 %prep
72 %setup -q
73 cp %{SOURCE1001} .
74
75 %build
76 %{?asan:%restore_fcommon}
77 export CFLAGS="${CFLAGS} -fPIE"
78 export LDFLAGS="${LDFLAGS} -pie"
79 %configure \
80   --disable-evms \
81   --with-root-prefix=''   \
82   --enable-elf-shlibs \
83   --disable-libblkid \
84   --disable-libuuid \
85   --disable-uuidd \
86   --disable-nls \
87   --disable-fsck \
88
89 make %{?_smp_mflags} V=1
90
91 %install
92 make install install-libs DESTDIR=$RPM_BUILD_ROOT ELF_INSTALL_DIR=/%{_libdir}
93 find "%buildroot/%_libdir" -type f -name "*.a" \
94        -print -delete
95 # Let boot continue even if system clock is wrong
96 install -p -m 644 %{SOURCE2} %{buildroot}/etc/e2fsck.conf
97
98
99 rm $RPM_BUILD_ROOT%{_libdir}/e2initrd_helper
100 rm -f $RPM_BUILD_ROOT/%{_sbindir}/mkfs.ext4dev
101 rm -f $RPM_BUILD_ROOT/%{_sbindir}/fsck.ext4dev
102 rm -f $RPM_BUILD_ROOT/usr/share/man/man8/mkfs.ext4dev.8*
103 rm -f $RPM_BUILD_ROOT/usr/share/man/man8/fsck.ext4dev.8*
104
105 mkdir -p %{buildroot}/%{_defaultdocdir}/%{name}
106 install -p -m 644 README %{buildroot}/%{_defaultdocdir}/%{name}/README
107 install -p -m 644 RELEASE-NOTES %{buildroot}/%{_defaultdocdir}/%{name}/RELEASE-NOTES
108
109 %post -p /sbin/ldconfig
110
111 %postun -p /sbin/ldconfig
112
113 %post -n libext2fs -p /sbin/ldconfig
114
115 %postun -n libext2fs -p /sbin/ldconfig
116
117 %post -n libcom_err -p /sbin/ldconfig
118
119 %postun -n libcom_err -p /sbin/ldconfig
120
121 %docs_package
122 %doc %{_defaultdocdir}/%{name}/RELEASE-NOTES
123 %doc %{_defaultdocdir}/%{name}/README
124
125 %files devel
126 %manifest %{name}.manifest
127 %doc README
128
129 %files
130 %manifest %{name}.manifest
131 %defattr(-, root, root)
132 %license NOTICE
133 %config /etc/e2fsck.conf
134 %config /etc/mke2fs.conf
135 %{_sbindir}/badblocks
136 %{_sbindir}/debugfs
137 %{_sbindir}/dumpe2fs
138 %{_sbindir}/e2undo
139 %{_sbindir}/e2fsck
140 %{_sbindir}/e2label
141 %{_sbindir}/fsck.ext2
142 %{_sbindir}/fsck.ext3
143 %{_sbindir}/fsck.ext4
144 %{_sbindir}/mke2fs
145 %{_sbindir}/mkfs.ext2
146 %{_sbindir}/mkfs.ext3
147 %{_sbindir}/mkfs.ext4
148 %{_sbindir}/resize2fs
149 %{_sbindir}/tune2fs
150 %{_sbindir}/e2image
151 %{_sbindir}/logsave
152 %{_bindir}/chattr
153 %{_bindir}/lsattr
154 %{_sbindir}/mklost+found
155 %{_sbindir}/filefrag
156 %{_sbindir}/e2freefrag
157 %{_sbindir}/e4crypt
158 %{_sbindir}/e4defrag
159
160 %files -n libext2fs
161 %manifest %{name}.manifest
162 %defattr(-, root, root)
163 %license NOTICE
164 %{_libdir}/libext2fs.so.*
165 %{_libdir}/libe2p.so.*
166
167 %files -n libext2fs-devel
168 %manifest %{name}.manifest
169 %defattr(-, root, root)
170 %{_libdir}/libext2fs.so
171 %{_libdir}/libe2p.so
172 /usr/include/ext2fs
173 /usr/include/e2p
174 %_libdir/pkgconfig/e2p.pc
175 %_libdir/pkgconfig/ext2fs.pc
176
177 %files -n libcom_err
178 %manifest %{name}.manifest
179 %defattr(-, root, root)
180 %license debian/copyright
181 %{_libdir}/libcom_err.so.*
182 %{_libdir}/libss.so.*
183
184 %files -n libcom_err-devel
185 %manifest %{name}.manifest
186 %defattr(-, root, root)
187 %_bindir/compile_et
188 %_bindir/mk_cmds
189 %{_libdir}/libcom_err.so
190 %{_libdir}/libss.so
191 %_libdir/pkgconfig/com_err.pc
192 %_libdir/pkgconfig/ss.pc
193 %_includedir/com_err.h
194 %_includedir/et
195 %_includedir/ss
196 %_datadir/et
197 %_datadir/ss
198
199 %changelog