4 Star 0 Fork 3

OpenCloudOS Stream/firebird

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
firebird.spec 12.62 KB
一键复制 编辑 原始数据 按行查看 历史
brucezhang 提交于 2025-10-10 11:31 +08:00 . fix version
%global pkgversion Firebird-%{version}-0
%global major %%(echo %{version} |cut -d. -f1-2)
%global short_version %%(echo %{version} |rev |cut -d. -f2- |rev)
%global _hardened_build 1
%global _lto_cflags %nil
Name: firebird
Version: 4.0.6.3221
Release: 1%{?dist}
Summary: SQL relational database management system
License: Interbase-1.0
URL: http://www.firebirdsql.org/
Source0: https://github.com/FirebirdSQL/firebird/releases/download/v%{short_version}/%{pkgversion}.tar.xz
Source1: firebird-logrotate
Source2: README
Source3: firebird.service
Source4: fb_config
Patch101: add-pkgconfig-files.patch
Patch203: no-copy-from-icu.patch
Patch205: cloop-honour-build-flags.patch
Patch301: c++17.patch
Patch302: noexcept.patch
Patch401: btyacc-honour-build-flags.patch
Patch501: examples-honour-build-flags.patch
Patch502: 0001-firebird-4.0.6-add-support-for-loongarch64.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtommath-devel
BuildRequires: libtool
BuildRequires: ncurses-devel
BuildRequires: libicu-devel
BuildRequires: libedit-devel
BuildRequires: gcc-c++
BuildRequires: libstdc++-static
BuildRequires: systemd-rpm-macros
BuildRequires: chrpath
BuildRequires: zlib-devel
BuildRequires: procmail
BuildRequires: make
BuildRequires: libtomcrypt-devel
BuildRequires: unzip
BuildRequires: sed
Requires(postun): /usr/sbin/userdel
Requires(postun): /usr/sbin/groupdel
Recommends: logrotate
Requires: libfbclient2 = %{version}-%{release}
Requires: libib-util = %{version}-%{release}
Requires: %{name}-utils = %{version}-%{release}
Obsoletes: firebird-arch < 4.0
Obsoletes: firebird-filesystem < 4.0
Obsoletes: firebird-classic-common < 4.0
Obsoletes: firebird-classic < 4.0
Obsoletes: firebird-superclassic < 4.0
Obsoletes: firebird-superserver < 4.0
Conflicts: firebird-arch < 4.0
Conflicts: firebird-filesystem < 4.0
Conflicts: firebird-classic-common < 4.0
Conflicts: firebird-classic < 4.0
Conflicts: firebird-superclassic < 4.0
Conflicts: firebird-superserver < 4.0
%description
Firebird is a relational database offering many ANSI SQL standard
features that runs on Linux, Windows, and a variety of Unix platforms.
Firebird offers excellent concurrency, high performance, and powerful
language support for stored procedures and triggers. It has been used
in production systems, under a variety of names, since 1981.
%package devel
Requires: %{name} = %{version}-%{release}
Requires: libfbclient2-devel = %{version}-%{release}
Summary: UDF support library for Firebird SQL server
%description devel
This package is needed for development of client applications and user
defined functions (UDF) for Firebird SQL server.
Firebird is a relational database offering many ANSI SQL standard
features that runs on Linux, Windows, and a variety of Unix platforms.
Firebird offers excellent concurrency, high performance, and powerful
language support for stored procedures and triggers. It has been used
in production systems, under a variety of names, since 1981.
%package -n libib-util
Summary: Firebird SQL UDF support library
%description -n libib-util
libib_util contains utility functions used by
User-Defined Functions (UDF) for memory management etc.
Firebird is a relational database offering many ANSI SQL standard
features that runs on Linux, Windows, and a variety of Unix platforms.
Firebird offers excellent concurrency, high performance, and powerful
language support for stored procedures and triggers. It has been used
in production systems, under a variety of names, since 1981.
%package -n libfbclient2
Summary: Firebird SQL server client library
Obsoletes: firebird-libfbclient < 4.0
Conflicts: firebird-libfbclient < 4.0
Obsoletes: firebird-libfbembed < 4.0
%description -n libfbclient2
Shared client library for Firebird SQL server.
Firebird is a relational database offering many ANSI SQL standard
features that runs on Linux, Windows, and a variety of Unix platforms.
Firebird offers excellent concurrency, high performance, and powerful
language support for stored procedures and triggers. It has been used
in production systems, under a variety of names, since 1981.
%package -n libfbclient2-devel
Summary: Development libraries and headers for Firebird SQL server
Requires: %{name}-devel = %{version}-%{release}
Requires: libfbclient2 = %{version}-%{release}
Requires: pkgconfig
%description -n libfbclient2-devel
Development files for Firebird SQL server client library.
Firebird is a relational database offering many ANSI SQL standard
features that runs on Linux, Windows, and a variety of Unix platforms.
Firebird offers excellent concurrency, high performance, and powerful
language support for stored procedures and triggers. It has been used
in production systems, under a variety of names, since 1981.
%package doc
Requires: %{name} = %{version}-%{release}
Summary: Documentation for Firebird SQL server
BuildArch: noarch
%description doc
Documentation for Firebird SQL server.
Firebird is a relational database offering many ANSI SQL standard
features that runs on Linux, Windows, and a variety of Unix platforms.
Firebird offers excellent concurrency, high performance, and powerful
language support for stored procedures and triggers. It has been used
in production systems, under a variety of names, since 1981.
%package utils
Requires: libfbclient2 = %{version}-%{release}
Summary: Firebird SQL user utilities
%description utils
Firebird SQL user utilities.
Firebird is a relational database offering many ANSI SQL standard
features that runs on Linux, Windows, and a variety of Unix platforms.
Firebird offers excellent concurrency, high performance, and powerful
language support for stored procedures and triggers. It has been used
in production systems, under a variety of names, since 1981.
%package examples
Requires: %{name}-doc = %{version}-%{release}
Summary: Examples for Firebird SQL server
BuildArch: noarch
%description examples
Examples for Firebird SQL server.
Firebird is a relational database offering many ANSI SQL standard
features that runs on Linux, Windows, and a variety of Unix platforms.
Firebird offers excellent concurrency, high performance, and powerful
language support for stored procedures and triggers. It has been used
in production systems, under a variety of names, since 1981.
%prep
%setup -q -n %{pkgversion}
%patch -P101 -p1
%patch -P203 -p1
%patch -P205 -p1
%patch -P301 -p1
%patch -P302 -p1
%patch -P401 -p1
%patch -P501 -p1
%patch -P502 -p1
cat >firebird.sysusers.conf <<EOF
u firebird - - - -
EOF
%build
%ifarch s390x
%global _lto_cflags %{nil}
%endif
export CFLAGS="%{optflags} -fno-strict-aliasing"
export CXXFLAGS="${CFLAGS} -fno-delete-null-pointer-checks"
NOCONFIGURE=1 ./autogen.sh
%configure --disable-rpath --prefix=%{_prefix} \
--with-system-editline \
--with-fbbin=%{_bindir} --with-fbsbin=%{_sbindir} \
--with-fbconf=%{_sysconfdir}/%{name} \
--with-fblib=%{_libdir} --with-fbinclude=%{_includedir} \
--with-fbdoc=%{_defaultdocdir}/%{name} \
--with-fbsample=%{_defaultdocdir}/%{name}/sample \
--with-fbsample-db=%{_localstatedir}/lib/%{name}/data \
--with-fbhelp=%{_localstatedir}/lib/%{name}/system \
--with-fbintl=%{_libdir}/%{name}/intl \
--with-fbmisc=%{_datadir}/%{name}/misc \
--with-fbsecure-db=%{_localstatedir}/lib/%{name}/secdb \
--with-fbmsg=%{_localstatedir}/lib/%{name}/system \
--with-fblog=%{_localstatedir}/log/%{name} \
--with-fbglock=%{_rundir}/%{name} \
--with-fbplugins=%{_libdir}/%{name}/plugins \
--with-fbtzdata=%{_localstatedir}/lib/%{name}/tzdata
make %{?_smp_mflags}
cd gen
sed -i '/linkFiles "/d' ./install/makeInstallImage.sh
./install/makeInstallImage.sh
chmod -R u+w buildroot%{_docdir}/%{name}
%install
chmod u+rw,a+rx gen/buildroot/%{_includedir}/firebird/impl
cp -r gen/buildroot/* ${RPM_BUILD_ROOT}/
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/pkgconfig
cp -v gen/install/misc/*.pc ${RPM_BUILD_ROOT}%{_libdir}/pkgconfig/
install -m0644 -D firebird.sysusers.conf %{buildroot}%{_sysusersdir}/firebird.conf
cd ${RPM_BUILD_ROOT}
rm -vf .%{_sbindir}/*.sh
mv -v .%{_sbindir}/fb_config .%{_libdir}/
install -p -m 0755 %{SOURCE4} %{buildroot}%{_sbindir}/fb_config
rm -vf .%{_includedir}/perf.h
rm -vf .%{_libdir}/libicu*.so
chmod -R u+w .%{_docdir}/%{name}
mv -v .%{_datadir}/%{name}/misc/upgrade/udf/* .%{_docdir}/%{name}/
rm -rvf .%{_datadir}/%{name}/misc
mv -v .%{_sysconfdir}/%{name}/README.md .%{_sysconfdir}/%{name}/CHANGELOG.md \
.%{_docdir}/%{name}/
mv -v .%{_sysconfdir}/%{name}/IDPLicense.txt .%{_docdir}/%{name}/
mv -v .%{_sysconfdir}/%{name}/IPLicense.txt .%{_docdir}/%{name}/
install -p -m 0644 -D %{SOURCE2} .%{_docdir}/%{name}/README
mv -v .%{_bindir}/gstat .%{_bindir}/gstat-fb
mv -v .%{_bindir}/isql .%{_bindir}/isql-fb
rm -rvf .%{_defaultdocdir}/%{name}/sample/prebuilt
mkdir -p .%{_localstatedir}/log/%{name}
mkdir -p .%{_sysconfdir}/logrotate.d
echo 1 > .%{_localstatedir}/log/%{name}/%{name}.log
sed "s@%{name}.log@%{_localstatedir}/log/%{name}/%{name}.log@g" %{SOURCE1} > .%{_sysconfdir}/logrotate.d/%{name}
mkdir -p .%{_unitdir}
cp -f %{SOURCE3} .%{_unitdir}/%{name}.service
%pre
FileName=/etc/services
newLine="gds_db 3050/tcp # Firebird SQL Database Remote Protocol"
oldLine=`grep "^gds_db" $FileName`
if [ -z "$oldLine" ]; then
echo $newLine >> $FileName
fi
%post
%systemd_post firebird.service
%postun
%systemd_postun_with_restart firebird.service
%preun
%systemd_preun firebird.service
%files
%{_docdir}/%{name}/
%{_bindir}/fbtracemgr
%{_sbindir}/firebird
%{_sbindir}/fbguard
%{_sbindir}/fb_lock_print
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/databases.conf
%config(noreplace) %{_sysconfdir}/%{name}/fbtrace.conf
%config(noreplace) %{_sysconfdir}/%{name}/firebird.conf
%config(noreplace) %{_sysconfdir}/%{name}/plugins.conf
%config(noreplace) %{_sysconfdir}/%{name}/replication.conf
%dir %{_libdir}/%{name}
%dir %{_datadir}/%{name}
%{_libdir}/%{name}/intl
%{_libdir}/%{name}/plugins
%dir %{_localstatedir}/lib/%{name}
%dir %attr(0700,%{name},%{name}) %{_localstatedir}/lib/%{name}/secdb
%dir %attr(0700,%{name},%{name}) %{_localstatedir}/lib/%{name}/data
%dir %attr(0755,%{name},%{name}) %{_localstatedir}/lib/%{name}/system
%dir %attr(0755,%{name},%{name}) %{_localstatedir}/lib/%{name}/tzdata
%attr(0600,firebird,firebird) %config(noreplace) %{_localstatedir}/lib/%{name}/secdb/security4.fdb
%attr(0644,firebird,firebird) %{_localstatedir}/lib/%{name}/system/help.fdb
%attr(0644,firebird,firebird) %{_localstatedir}/lib/%{name}/system/firebird.msg
%attr(0644,firebird,firebird) %{_localstatedir}/lib/%{name}/tzdata/*.res
%ghost %dir %attr(0775,%{name},%{name}) /run/%{name}
%ghost %attr(0644,%{name},%{name}) /run/%{name}/fb_guard
%dir %{_localstatedir}/log/%{name}
%config(noreplace) %attr(0664,%{name},%{name}) %{_localstatedir}/log/%{name}/%{name}.log
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/logrotate.d/%{name}
%attr(0644,root,root) %{_unitdir}/%{name}.service
%{_sysusersdir}/firebird.conf
%files devel
%{_includedir}/*.h
%{_includedir}/%{name}
%{_libdir}/fb_config
%{_sbindir}/fb_config
%files -n libfbclient2
%{_libdir}/libfbclient.so.*
%files -n libfbclient2-devel
%{_libdir}/libfbclient.so
%{_libdir}/pkgconfig/fbclient.pc
%files -n libib-util
%{_libdir}/libib_util.so
%files doc
%{_docdir}/%{name}/
%exclude %{_docdir}/%{name}/sample
%exclude %{_docdir}/%{name}/IDPLicense.txt
%exclude %{_docdir}/%{name}/IPLicense.txt
%files utils
%{_bindir}/gstat-fb
%{_bindir}/fbsvcmgr
%{_bindir}/gbak
%{_bindir}/gfix
%{_bindir}/gpre
%{_bindir}/gsec
%{_bindir}/isql-fb
%{_bindir}/nbackup
%{_bindir}/qli
%{_bindir}/gsplit
%files examples
%{_docdir}/%{name}/sample
%attr(0600,firebird,firebird) %{_localstatedir}/lib/%{name}/data/employee.fdb
%changelog
* Thu Oct 09 2025 bbrucezhang <bbrucezhang@tencent.com> - 4.0.6.3221-1
- [Type] other
- [DESC] Update to 4.0.6.3221
* Wed Jun 04 2025 bbrucezhang <bbrucezhang@tencent.com> - 4.0.4.3010-3
- Rebuilt for loongarch64
* Thu Jan 23 2025 doupengda <doupengda@loongson.cn> - 4.0.4.3010-2
- [Type] other
- [DESC] add support for loongarch64
* Tue Jan 14 2025 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 4.0.4.3010-1
- [Type] security
- [DESC] Fix CVE-2023-41038
* Tue Jul 02 2024 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 4.0.3.2975-3
- rebuild
* Mon Jul 01 2024 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 4.0.3.2975-2
- rebuild
* Fri Apr 12 2024 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 4.0.3.2975-1
- initial build
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/opencloudos-stream/firebird.git
git@gitee.com:opencloudos-stream/firebird.git
opencloudos-stream
firebird
firebird
master

搜索帮助