구축하려고 해요https://github.com/wallix/redemption우분투 20.04에서.
컴파일이 실제로 성공했고, .deb 파일을 생성할 수 있는 Python 스크립트가 있다는 것을 깨달았습니다.도구/packager.py. dh_install
(의 도구 )를 사용 sudo apt install debhelper
하고 분명히 이러한 파일을 참조합니다.패키지/템플릿/데비안/규칙- 그리고패키지/템플릿/debian/redemption.install, 여기에는 다음 항목만 포함됩니다.
%ETC_PREFIX%/*
%PREFIX%/bin/*
%PREFIX%/share/rdpproxy/*
%LIB_PREFIX%/libredrec.so
좋아, 그래서 다음과 같이 스크립트를 실행했는데 실패했습니다.
$ ./tools/packager.py --build-package --force-build
...
dh_installdocs: warning: Compatibility levels before 9 are deprecated (level 7 in use)
install -d debian/.debhelper/generated/redemption
install -p -m0644 debian/copyright debian/redemption/usr/share/doc/redemption/copyright
# install files into package build directories
# debian/redemption.install list the files to install into each package
# and the directory they should be installed to. It destination directory
# is missing dh_install guess for destination.
#--list-missing or --fail-missing
# This option makes dh_install keep track of the files it installs, and
# then at the end, compare that list with the files in the source directory.
# If any of the files (and symlinks) in the source directory were not
# installed to somewhere, it will warn on stderr about that (or fail).
# --sourcedir=dir
# Look in the specified directory for files to be installed.
# default is to look in debian/tmp
dh_install --sourcedir=debian/buildtmp --list-missing
dh_install: warning: Compatibility levels before 9 are deprecated (level 7 in use)
dh_install: warning: Please use dh_missing --list-missing/--fail-missing instead
dh_install: warning: This feature will be removed in compat 12.
dh_install: warning: Cannot find (any matches for) "etc/rdpproxy/*" (tried in debian/buildtmp, debian/tmp)
dh_install: warning: redemption missing files: etc/rdpproxy/*
dh_install: warning: Cannot find (any matches for) "usr/local/bin/*" (tried in debian/buildtmp, debian/tmp)
dh_install: warning: redemption missing files: usr/local/bin/*
dh_install: warning: Cannot find (any matches for) "usr/local/share/rdpproxy/*" (tried in debian/buildtmp, debian/tmp)
dh_install: warning: redemption missing files: usr/local/share/rdpproxy/*
dh_install: warning: Cannot find (any matches for) "/libredrec.so" (tried in debian/buildtmp, debian/tmp)
dh_install: warning: redemption missing files: /libredrec.so
dh_install: error: missing files, aborting
make: *** [debian/rules:66: binary-arch] Error 255
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2
Build failed: system fail with code 512: dpkg-buildpackage -b -tc -us -uc -r
---------
ERROR:root:Traceback (most recent call last):
File "./tools/packager.py", line 497, in <module>
try_system("dpkg-buildpackage -b -tc -us -uc -r")
File "./tools/packager.py", line 40, in try_system
raise Exception("system fail with code %d: %s" % (status, cmd))
Exception: system fail with code 512: dpkg-buildpackage -b -tc -us -uc -r
좋습니다. "* 찾을 수 없음(일치 항목)"이라고 표시됩니다 /libredrec.so
( debian/buildtmp
""에서 시도했지만 검색하면 다음과 같은 결과가 표시됩니다.
$ find . -name libredrec.so
./bin/gcc-9/release/libredrec.so
./debian/buildtmpusr/local/lib/libredrec.so
그래서 있습니다.예a libredrec.so
in ./debian/buildtmpusr/local/lib/
- 그런데 경로가 일치하지 않는 것 같아요 debian/buildtmp
.
이 스크립트를 완료하려면 무엇을 수행/변경해야 합니까?
답변1
실제로 @StephenKitt가 옳습니다. "슬래시 누락 문제"에 관한 것이지만 결국 약간 더 복잡해집니다.
그런 문서가 있다는 걸 알게 됐어요감싸기/대상/늘이기(또한 buster
sum jessie
)에는 다음이 있습니다.
PREFIX=/usr/local
ETC_PREFIX=/etc/rdpproxy
CERT_PREFIX=/etc/rdpproxy/cert
...
LIB_PREFIX=/usr/local/lib
...
...문자열의 시작 부분에는 분명히 슬래시가 있습니다.
그러나 언급했듯이 저는 Ubuntu 20.04를 기반으로 구축하고 있으므로 위의 대상 배포 파일 중 어느 것도 저에게 적합하지 않습니다. 즉, 다음의 설정에 의존해야 합니다.도구/packager.py- 실제로 슬래시가 누락되었습니다( LIB_PREFIX
또한 누락되었습니다).
./tools/packager.py --build-package --force-build
마지막으로, 작동하도록 변경한 내용은 다음과 같습니다 git diff
.
diff --git a/packaging/template/debian/compat b/packaging/template/debian/compat
index e30739cb5..3b0923b7e 100755
--- a/packaging/template/debian/compat
+++ b/packaging/template/debian/compat
@@ -1 +1 @@
-7
+9
diff --git a/packaging/template/debian/rules b/packaging/template/debian/rules
index 014c470e4..49253265c 100755
--- a/packaging/template/debian/rules
+++ b/packaging/template/debian/rules
@@ -63,7 +63,9 @@ binary-arch: build install
# --sourcedir=dir
# Look in the specified directory for files to be installed.
# default is to look in debian/tmp
- dh_install --sourcedir=$(DESTDIR) --list-missing
+ #dh_install --sourcedir=$(DESTDIR) --list-missing
+ dh_missing --list-missing
+ dh_install --sourcedir=$(DESTDIR)
dh_strip
dh_compress
dh_fixperms
diff --git a/tools/distroinfo.py b/tools/distroinfo.py
index 143acc628..e0ff2c0f0 100644
--- a/tools/distroinfo.py
+++ b/tools/distroinfo.py
@@ -52,7 +52,8 @@ def get_distro():
'17.04': ('Zesty', 'Zapus'),
'17.10': ('Artful', 'Aardvark'),
'18.04': ('B', 'B'),
- '18.10': ('C', 'C')
+ '18.10': ('C', 'C'),
+ '20.04': ('Focal', 'Fossa')
}
name = codenames[version][0].lower()
else:
diff --git a/tools/packager.py b/tools/packager.py
index d4eafa002..1af49dcd7 100755
--- a/tools/packager.py
+++ b/tools/packager.py
@@ -59,9 +59,13 @@ class opts(object):
force_build = False
config = {}
- config["%PREFIX%"] = 'usr/local'
- config["%ETC_PREFIX%"] = 'etc/rdpproxy'
- config["%CERT_PREFIX%"] = 'etc/rdpproxy/cert'
+ #config["%PREFIX%"] = 'usr/local'
+ #config["%ETC_PREFIX%"] = 'etc/rdpproxy'
+ #config["%CERT_PREFIX%"] = 'etc/rdpproxy/cert'
+ config["%PREFIX%"] = '/usr/local'
+ config["%ETC_PREFIX%"] = '/etc/rdpproxy'
+ config["%CERT_PREFIX%"] = '/etc/rdpproxy/cert'
+ config["%LIB_PREFIX%"] = '/usr/local/lib'
config["%METRICS_PATH%"] = '/var/rdpproxy/recorded/metrics'
config["%RECORD_PATH%"] = '/var/rdpproxy/recorded/rdp'
config["%RECORD_TMP_PATH%"] = '/var/rdpproxy/tmp'
일단 완료되면 (git 저장소가 저장된 상위 디렉토리에) ./tools/packager.py --build-package --force-build
있습니다 .../redemption_10.4.41+focal_amd64.deb
편집: 이 프로젝트에 더 많은 대상 실행 파일을 추가하려면( grep '^exe' targets.jam
및 참조 grep '^exe' ./Jamroot
) 다음과 같이 변경할 수도 있습니다.
diff --git a/Jamroot b/Jamroot
index eb4188fdd..e4834c55c 100644
--- a/Jamroot
+++ b/Jamroot
@@ -155,7 +155,8 @@ alias install :
install-share
install-gettext
;
-alias exe : rdpproxy rdpclient rdpinichecker ;
+#alias exe : rdpproxy rdpclient rdpinichecker ;
+alias exe : rdpproxy rdpclient rdpinichecker mwrm3_editor headlessclient nla_server proxy_recorder display_learning extract_text ppocr_extract_text redrec ;
alias libs : libredrec ;
alias ocr_tools : display_learning extract_text ppocr_extract_text ;
EDIT2: qtclient도 포함하고 싶지만 실행 가능하다면 이는 상당히 까다로워집니다.https://stackoverflow.com/questions/75340407/bjam-build-subfolder-project-change-directory-to-subfolder-project-before-bui