Closed DejavuDmitry closed 9 years ago
Hi,
you need to make the DTD schema files available at:
$ grep SCHEMA config.h
#define XML_SCHEMA_DIR "/usr/local/share/xml/schema/apt-dater"
#define XML_SCHEMA_URI "file:///usr/local/share/xml/schema/apt-dater"
make install
does not copy the files, yet. You can change the schema path by setting the following environment variables:
$ ./configure --help
...
XMLSCHEMADIR
XML schema directory (default: DATAROOTDIR/xml/schema/apt-dater)
XMLSCHEMAURI
XML schema URI (default: file://XMLSCHEMADIR)
...
HTH, Thomas
Hi, Sorry, but what is "DTD schema files"? I haven't /usr/local/share/xml/schema/apt-dater dir in my system.
$ ls -a /usr/local/share/xml/schema/
. ..
The schema files are schema/*.dtd
within the sources. They should be get installed during make install
.
And if I don't want to install apt-dater in my system. Can i just copy this files into property directory on my system? Just without make install
...
This will work. The make install
for the schema directory just copies the files:
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(XMLSCHEMADIR)
for dtd in apt-dater.dtd hosts.dtd report.dtd; do \
$(INSTALL) "$dtd" "$(DESTDIR)$(XMLSCHEMADIR)/"; \
done
So sad...
dejavu@oit-d-iliukhin:~/build/apt-dater/schema$ sudo make install
make[1]: вход в каталог «/home/dejavu/build/apt-dater/schema»
make[1]: Цель «install-exec-am» не требует выполнения команд.
/bin/bash ../mkinstalldirs /usr/local/share/xml/schema/apt-dater
mkdir -p -- /usr/local/share/xml/schema/apt-dater
for dtd in apt-dater.dtd hosts.dtd report.dtd; do \
/usr/bin/install -c "td" "/usr/local/share/xml/schema/apt-dater/"; \
done
/usr/bin/install: не удалось выполнить stat для «td»: Нет такого файла или каталога
/usr/bin/install: не удалось выполнить stat для «td»: Нет такого файла или каталога
/usr/bin/install: не удалось выполнить stat для «td»: Нет такого файла или каталога
Makefile:436: ошибка выполнения рецепта для цели «install-data-local»
make[1]: *** [install-data-local] Ошибка 1
make[1]: выход из каталога «/home/dejavu/build/apt-dater/schema»
Makefile:332: ошибка выполнения рецепта для цели «install-am»
make: *** [install-am] Ошибка 2
Manually:
dejavu@oit-d-iliukhin:~/build/apt-dater/schema$ for dtd in apt-dater.dtd hosts.dtd report.dtd; do sudo /usr/bin/install -c "$dtd" "/usr/local/share/xml/schema/apt-dater/"; done
dejavu@oit-d-iliukhin:~/build/apt-dater/schema$ cd -
/home/dejavu/build/apt-dater
dejavu@oit-d-iliukhin:~/build/apt-dater$ ./src/apt-dater
validity error : no DTD found!
Error on loading config file /home/dejavu/.config/apt-dater/apt-dater.xml
No words?
Use the environment variables while running ./configure
as quoted above (the paths specified at configure-time are used in apt-dater and the example .xml config files):
$ ./configure --help
...
XMLSCHEMADIR
XML schema directory (default: DATAROOTDIR/xml/schema/apt-dater)
XMLSCHEMAURI
XML schema URI (default: file://XMLSCHEMADIR)
...
There was a missing escape sequence in schema/Makefile.am
which has been fixed by 3830e75e7249350f8c7ec43510a1347f6dc673ff.
PS: Please provide error messages in LANG=C.
I just can't understand what a must do to get success result...
But WHY? What happened?
This seems not to be an issue of apt-dater
. I've referenced the help text twice howto configure the destination of the XML schema files.
In case you get this bug, like I did, the correct answer is that for a while apt-dater has created an XML config without DTD validation, while now it requires it. It has nothing to do with environment variables.
If you used apt-dater during this time, your current configuration file must be adapted. There are a few other new sections needed to make it run, therefore I suggest you move your current configuration out of the way (mv ~/.config/apt-dater ~/.config/apt-dater.bkp), run apt-dater once to create sane configuration files, and reconfigure it patiently, by comparing the old and new files.
It is at least the second time now that this project has released a minor version without backward config files compatibility (initially there were plaintext config files, then XML without DTD, now XML with DTD, and never a migration routine)... the developers may want to look at http://semver.org/ for sane versioning; it should be at least at version 3.x, while it's still version 1.0. Then again, it's their project... this is just my opinion.
I have a some bug or something similar.