ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
* [sisyphus] q: pdfedit, qmake и $(INSTALL_ROOT)../../../../../../
@ 2007-03-18 22:27 Michael Shigorin
  2007-03-18 22:35 ` Andrey Rahmatullin
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Shigorin @ 2007-03-18 22:27 UTC (permalink / raw)
  To: sisyphus

[-- Attachment #1: Type: text/plain, Size: 2443 bytes --]

	Здравствуйте.
Возможно, это типичные грабли и кто-то знает простой ответ...

Решил попробовать собрать pdfedit, подсунув adiel@ статью
http://applications.linux.com/print.pl?sid=07/03/09/1810218
и получив положительный отзыв.

Спек пришлось рисовать с нуля, по какому собраны пакеты на
pdfedit.sf.net -- непонятно.  Собирается, но не %install'ится:

=== pdfedit.spec ===
%install
unset QTDIR || : ; . /etc/profile.d/qt3dir.sh ; PATH=$PATH:$QTDIR/bin
export INSTALL_ROOT=%buildroot
mkdir -p %buildroot
%makeinstall
install -pD -m644 %SOURCE1 %buildroot%_desktopdir/%name.desktop

(про необходимость выставления INSTALL_ROOT подсмотрено
в debian/rules, больше нигде будто не водится)


=== src/gui/Makefile ===
install_data: all
        @$(CHK_DIR_EXISTS) "$(INSTALL_ROOT)../../../../../../share/pdfedit/" || $(MKDIR) "$(INSTALL_ROOT)../../../../../../share/pdfedit/"
        -$(INSTALL_FILE) "pdfeditrc" "$(INSTALL_ROOT)../../../../../../share/pdfedit/"
        -$(INSTALL_FILE) "mode.conf" "$(INSTALL_ROOT)../../../../../../share/pdfedit/"
        -$(INSTALL_FILE) "callback.qs" "$(INSTALL_ROOT)../../../../../../share/pdfedit/"
        -$(INSTALL_FILE) "delinearize.qs" "$(INSTALL_ROOT)../../../../../../share/pdfedit/"
        -$(INSTALL_FILE) "dialog_lib.qs" "$(INSTALL_ROOT)../../../../../../share/pdfedit/"
        -$(INSTALL_FILE) "dialogs.qs" "$(INSTALL_ROOT)../../../../../../share/pdfedit/"
        -$(INSTALL_FILE) "init.qs" "$(INSTALL_ROOT)../../../../../../share/pdfedit/"
        -$(INSTALL_FILE) "init_console.qs" "$(INSTALL_ROOT)../../../../../../share/pdfedit/"
        -$(INSTALL_FILE) "menu.qs" "$(INSTALL_ROOT)../../../../../../share/pdfedit/"
        -$(INSTALL_FILE) "page.qs" "$(INSTALL_ROOT)../../../../../../share/pdfedit/"
        -$(INSTALL_FILE) "pdfoperator.qs" "$(INSTALL_ROOT)../../../../../../share/pdfedit/"
        -$(INSTALL_FILE) "test.qs" "$(INSTALL_ROOT)../../../../../../share/pdfedit/"
        -$(INSTALL_FILE) "operator.hint" "$(INSTALL_ROOT)../../../../../../share/pdfedit/"

=>

make[2]: Entering directory `/usr/src/RPM/BUILD/pdfedit-0.2.5/src/gui'
mkdir: cannot create directory `/usr/src/tmp/pdfedit-buildroot../../../../../../share': Permission denied

Вопрос очевиден: откуда бы это?

(пока похоже, что там на редкость кривая система сборки
и src/gui/Makefile порождается в процессе %makeinstall)

-- 
 ---- WBR, Michael Shigorin <mike@altlinux.ru>
  ------ Linux.Kiev http://www.linux.kiev.ua/

[-- Attachment #2: pdfedit.spec --]
[-- Type: text/plain, Size: 1863 bytes --]

Name: pdfedit
Version: 0.2.5
Release: alt1

Summary: Editor for manipulating PDF documents
License: GPL
Group: File tools

Url: http://pdfedit.petricek.net
Source0: %name-%version.tar.bz2
Source1: %name.desktop
Packager: Michael Shigorin <mike@altlinux.org>

# Automatically added by buildreq on Sun Mar 18 2007
BuildRequires: boost-iostreams-devel doxygen gcc-c++ imake libXp-devel libXpm-devel libXt-devel libpaper-devel libqt3-devel t1lib-devel xorg-cf-files

%{?!_desktopdir:%define _desktopdir %_datadir/applications}

%description
Complete editing of pdf documents is made possible with PDFedit.
You can change either raw pdf objects (for advanced users) or use
predefined gui functions. Functions can be easily added as everything
is based on a scripts.

Scripting is used to a great extent in editor and almost anything can
be scripted, it is possible to create own scripts or plugins.

%prep
%setup -q

%build
unset QTDIR || : ; . /etc/profile.d/qt3dir.sh ; PATH=$PATH:$QTDIR/bin
%configure
#make_build
%make

%install
unset QTDIR || : ; . /etc/profile.d/qt3dir.sh ; PATH=$PATH:$QTDIR/bin
mkdir -p %buildroot
export INSTALL_ROOT=%buildroot
# ugly hackaround for b0rken makefile
#find src -name Makefile \
#| xargs sed -i 's,../../../../../..,%prefix,g'
##| xargs sed -i 's,\(\$(INSTALL_ROOT)\)../../../../../..,\1%prefix,g'
sed -i 's,../../../../../..,%prefix,g' src/gui/Makefile
#fgrep ../../../../../.. src/gui/Makefile ||:
%makeinstall
chmod 644 %buildroot%_datadir/%name/icon/hicolor/*
install -pD -m644 %SOURCE1 %buildroot%_desktopdir/%name.desktop

%files
%_bindir/*
%_datadir/%name/
%_desktopdir/*
%doc ChangeLog README

%changelog
* Sun Mar 18 2007 Michael Shigorin <mike@altlinux.org> 0.2.5-alt1
- built for ALT Linux
- desktop file and package description borrowed from Debian
- had to kludge down install due to "directory traversal" attempts

[-- Attachment #3: pdfedit.desktop --]
[-- Type: text/plain, Size: 226 bytes --]

[Desktop Entry]
Encoding=UTF-8
Name=PDF Editor
Comment=PDF Editor
Exec=pdfedit
Icon=/usr/share/pdfedit/icon/pdfedit_logo.png
Type=Application
StartupNotify=false
Terminal=false
Categories=PDFEditor;PDFViewer;Viewer;Graphics;


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [sisyphus] q: pdfedit, qmake и $(INSTALL_ROOT)../../../../../../
  2007-03-18 22:27 [sisyphus] q: pdfedit, qmake и $(INSTALL_ROOT)../../../../../../ Michael Shigorin
@ 2007-03-18 22:35 ` Andrey Rahmatullin
  0 siblings, 0 replies; 2+ messages in thread
From: Andrey Rahmatullin @ 2007-03-18 22:35 UTC (permalink / raw)
  To: sisyphus

[-- Attachment #1: Type: text/plain, Size: 1038 bytes --]

On Mon, Mar 19, 2007 at 12:27:55AM +0200, Michael Shigorin wrote:
> Возможно, это типичные грабли 
zerg (25 сентября 2006 22:00:03):
А-а-а, вспомнил. В hasher там дописывается после INSTALL_ROOT всякие
../../

zerg (25 сентября 2006 22:00:21):
но вести должны туда, куда надо. Из-за чего - не знаю

wRAR (25 сентября 2006 22:00:37):
там usr вообще не упоминается

zerg (25 сентября 2006 22:01:35):
если текущий каталог /usr/src то может упоминаться ../bin , например

zerg (25 сентября 2006 22:38:14):
но вообще, я так и не понял, чего ему не хватает, чтоб красивые пути
делать, если в hasher :-(

zerg (25 сентября 2006 22:38:25):
может переменной какой-то ...


> и кто-то знает простой ответ...
http://wiki.qtcentre.org/index.php?title=Undocumented_qmake
qmake "CONFIG+=no_fixpath"


-- 
WBR, wRAR (ALT Linux Team)
Powered by the ALT Linux fortune(8):

К щастью, мы не первопроходцы.  Патчи можно стянуть у мандраки или
где-нибудь ещё.  Так что если влом, лучше так и писать: влом.
		-- at in devel@

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-03-18 22:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-18 22:27 [sisyphus] q: pdfedit, qmake и $(INSTALL_ROOT)../../../../../../ Michael Shigorin
2007-03-18 22:35 ` Andrey Rahmatullin

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git