OBS(Open Build Server)是用在做构建用的服务器,在目前的开发中,需要了解这一工具。
openEular的obs使用指南在这里:
https://gitee.com/zxs-un/openEuler-port2riscv64
osc -A https://build.tarsier-infra.com/ ls
home:vimer
Debian mail list有一些很好的学习资源,目前临时记录下来以作进一步的学习。
Subject: [PATCH 2/5] Update to debhelper-compat 13.
---
debian/compat | 1 -
debian/control | 2 +-
debian/rules | 9 ++++++++-
3 files changed, 9 insertions(+), 3 deletions(-)
delete mode 100644 debian/compat
diff --git a/debian/compat b/debian/compat
deleted file mode 100644
index 45a4fb7..0000000
--- a/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-8
diff --git a/debian/control b/debian/control
index 702a8fb..f8abb4d 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: net
Priority: optional
Maintainer: Debian QA Group <[email protected]>
Homepage: http://sourceforge.net/projects/bbom/
-Build-Depends: debhelper (>= 8.0.0), pkg-config, libgtk2.0-dev, libcurl4-gnutls-dev, autotools-dev
+Build-Depends: debhelper-compat (= 13), pkg-config, libgtk2.0-dev, libcurl4-gnutls-dev
Standards-Version: 3.9.3
Package: bitstormlite
diff --git a/debian/rules b/debian/rules
index 9109369..eb91fdd 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,4 +1,11 @@
#!/usr/bin/make -f
+export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-format
+
%:
- dh $@ --with autotools_dev
+ dh $@
+
+override_dh_autoreconf:
+
+override_dh_auto_configure:
+ ./configure --build=$(DEB_HOST_MULTIARCH) --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-option-checking --disable-silent-rules --libdir=\${prefix}/lib/$(DEB_HOST_MULTIARCH) --disable-maintainer-mode --disable-dependency-tracking
Hi,
I can sponsor this.
A few remarks, aside from the keyring change mentioned by Michel:
具体可以看一下这个package : pacman-package-manager
目前,debian有这么几个和build系统相关的东西:
总部wiki.
about这里云云了一大堆,看官可以自己去瞧一瞧,在此不必赘述(但是从项目背景的角度看,这个页面真的应该好好读一读,这样的话,你会更加明白rb的意义)。其实,这个项目的本身感觉是从安全的角度出发的。
Autotools是一个linux下使用广泛的build系统,尤其是在debian的packaging过程中需要大量遇到。所以,这篇文章根据https://earthly.dev/blog/autoconf/进行整理翻译,进行一些自己的积累。
Autotools主要由以下三大组件构成: autoconf
, automake
,aclocal
.
Autoconf是m4sh
写的,后者使用m4
宏。m4sh
提供了一些宏可以用来生成configure.ac
文件,然后接着可以自动产生configure
文件。
Debian的打包命令脚本中,最关键的其实 rules/
下的dh命令。
这里有一个wiki,需要好好滴进行学习。
convlit fails to cross build from source, because it uses the build architecture compiler. Letting dh_auto_build pass suitable CC to make mostly fixes that except for one bare gcc invocation. After making that substitutable as well, convlit cross builds successfully. Please consider applying the attached patch.
Helmut
diff -u convlit-1.8/debian/rules convlit-1.8/debian/rules
--- convlit-1.8/debian/rules
+++ convlit-1.8/debian/rules
@@ -21,8 +21,8 @@
build: build-stamp
build-stamp:
dh_testdir
- $(MAKE) -C $(CURDIR)/lib
- $(MAKE) -C $(CURDIR)/clit18
+ dh_auto_build --sourcedirectory=lib
+ dh_auto_build --sourcedirectory=clit18
touch $@
clean:
diff -u convlit-1.8/debian/changelog convlit-1.8/debian/changelog
--- convlit-1.8/debian/changelog
+++ convlit-1.8/debian/changelog
@@ -1,3 +1,12 @@
+convlit (1.8-1.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix FTCBFS: (Closes: #-1)
+ + Let dh_auto_build pass cross tools to make.
+ + Make one plain gcc call substitutable.
+
diff -u convlit-1.8/clit18/Makefile convlit-1.8/clit18/Makefile
--- convlit-1.8/clit18/Makefile
+++ convlit-1.8/clit18/Makefile
@@ -7,3 +7,3 @@
clit: clit.o hexdump.o drm5.o explode.o transmute.o display.o utils.o manifest.o ../lib/openclit.a
- gcc -o clit $^ -ltommath
+ $(CC) -o clit $^ -ltommath
Subject: [PATCH 1/2] debian/rules: Pass -ffile-prefix-map in CFLAGS to avoid
embedding build paths.
https://reproducible-builds.org/docs/build-path/
---
debian/rules | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/debian/rules b/debian/rules
index 60c65ac..d18f93e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,6 +17,10 @@ ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
else
CFLAGS += -O2
endif
+
+# Avoid embedding the build path for reproducible builds
+CFLAGS += -ffile-prefix-map=$(CURDIR)=.
+
export CFLAGS
--
2.35.1
##
Subject: [PATCH 2/2] debian/rules: Finish conversion to dh.
---
debian/rules | 61 +++++++---------------------------------------------
1 file changed, 8 insertions(+), 53 deletions(-)
diff --git a/debian/rules b/debian/rules
index d18f93e..40ffb83 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,59 +11,14 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%:
dh $@
-CFLAGS := -Wall -g
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0
-else
- CFLAGS += -O2
-endif
+override_dh_auto_build:
+ dh_auto_build --sourcedir=$(CURDIR)/lib
+ dh_auto_build --sourcedir=$(CURDIR)/clit18
-# Avoid embedding the build path for reproducible builds
-CFLAGS += -ffile-prefix-map=$(CURDIR)=.
+override_dh_auto_clean:
+ dh_auto_clean --sourcedir=$(CURDIR)/clit18
+ dh_auto_clean --sourcedir=$(CURDIR)/lib
+ dh_auto_clean
-export CFLAGS
-
-
-build: build-stamp
-build-stamp:
- dh_testdir
- $(MAKE) -C $(CURDIR)/lib
- $(MAKE) -C $(CURDIR)/clit18
- touch $@
-
-clean:
- dh_testdir
- dh_testroot
- rm -f build-stamp
- $(MAKE) -C $(CURDIR)/clit18 clean
- $(MAKE) -C $(CURDIR)/lib clean
- dh_clean
-
-install: build
- dh_testdir
- dh_testroot
- dh_prep
- dh_install
-
-binary-indep:
-# do nothing
-
-binary-arch: build install
- dh_testdir
- dh_testroot
- dh_installchangelogs
- dh_installdocs
- dh_installexamples
+override_dh_installman:
dh_installman debian/clit.1
- dh_link
- dh_strip
- dh_compress
- dh_fixperms
- dh_installdeb
- dh_shlibdeps
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
--
目前还没有对debian rust进行打包,但是应该在不远的将来会打包。
<count_omega> capitol: how do I download the crate? With cargo ?
<capitol> curl -L https://crates.io/api/v1/crates/$name/$version/download | tar -xf -
<count_omega> K thanks
<f_g> count_omega: cargo doesn't expose it itself, but `debcargo extract $crate` does
<f_g> (it's basically just the first step of `debcargo package`, which is what get's called by update.sh
https://blog.hackeriet.no/packaging-a-rust-project-for-debian/
一个更简单的IRC log:
00:33 < count_omega> clone the repo and install cargo debstatus : cargo install cargo-debstatus
00:34 < count_omega> then cd into the helix folder and run cargo debstatus, it will print all missing packages
00:36 < mjt> does it take experimental into account?
00:36 < mjt> or does it look at debcargo-conf?
00:37 < count_omega> no experimental, no d-c-c iirc
00:37 < mjt> so how does it know which deps are missing?
00:37 < count_omega> checks against udd
00:38 < count_omega> it's not ideal, granted, but I am eternally grateful for it
00:44 < count_omega> hah, owned by jonas: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1024683
00:44 < count_omega> vieta: ^
00:45 < count_omega> these are all (?) of the missing crates https://salsa.debian.org/debian/hx/-/blob/debian/latest/debian/TODO
01:14 < vieta> sry for the late respone @count_omega . I got by both (current and 23.05) versions: "Error: this command requires running
against an actual package in this workspace"
01:47 < count_omega> yeah you need to cd into a subdirectory
01:47 < count_omega> Like helix-core
01:55 < mjt> that smells like a work for someone with good experience in this area..
01:56 < mjt> and jonas apparently already have the work done
02:24 < count_omega> No, that's the thing: he packages bigger rust projects like that on his own (sure, he can do that) but outright
refuses to use any of the debcargo tooling/ team work and files ITPs for crates
02:24 < count_omega> And then gets mad when we upload our versions
02:33 < vieta_> Sry, I lost the context. Was that ment to me on "20:24"?
02:39 < count_omega> link to the paste ?
02:39 < vieta_> https://paste.debian.net/1281428/
02:42 < count_omega> so this prints all dependencies nicely and shows you what's missing. etcetera seems like a good starting point
02:42 < count_omega> https://crates.io/crates/etcetera
02:43 < count_omega> I recommend reading this first: https://blog.hackeriet.no/packaging-a-rust-project-for-debian/