Bug 228450 - Review Request: zhcon - A Fast Console CJK System Using FrameBuffer
Review Request: zhcon - A Fast Console CJK System Using FrameBuffer
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Mamoru TASAKA
Fedora Package Reviews List
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-02-13 01:39 EST by Hu Zheng
Modified: 2007-11-30 17:11 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-03-29 01:46:07 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
mtasaka: fedora‑review+
petersen: fedora‑cvs+


Attachments (Terms of Use)
Corrected some incorrect things in SPEC (1.43 KB, text/plain)
2007-02-14 02:19 EST, Parag AN(पराग)
no flags Details
I have a spec of zhcon myself, and it used in fedora-cn. You can try the attachment. In this spec, I use autoreconf to reconf the autotool stuff, it works in fedora-cn's chroot build(not mock, but alike) (1.97 KB, application/octet-stream)
2007-02-14 05:23 EST, Miao ZhiCheng
no flags Details

  None (edit)
Description Hu Zheng 2007-02-13 01:39:18 EST
Spec URL: <http://reciteword.cosoft.org.cn/redhat/zhcon.spec>
SRPM URL: <http://reciteword.cosoft.org.cn/redhat/zhcon-0.2.6-1.src.rpm>

Description:
Zhcon is a fast Linux Console Chinese System which supports
framebuffer device.It can display Chinese, Japanese or Korean
double byte characters.Supported language encodings include:
GB2312, GBK, BIG5, JIS and KSC.
It can also use input methods(table based) from M$ pwin98 and
UCDOS for M$-DOG.
Comment 1 Parag AN(पराग) 2007-02-13 06:44:32 EST
You need to add ncurses-devel in BuildRequires
also add disttag ,correct buildroot

mock build is failing with 
chmod 4755 /usr/bin/zhcon
chmod: cannot access '/usr/bin/zhcon': No such file or directory.
Comment 2 Hu Zheng 2007-02-13 21:43:26 EST
OK, I will add ncurses-devel.

What does add disttag mean?

The build root is right in my system, in Makefile.am:

install-exec-local:
        chmod 4755 $(DESTDIR)$(bindir)/zhcon

It should already be right, I don't know why it don't work on your
system, can you tell me how to modify it?
Comment 3 Miao ZhiCheng 2007-02-14 01:28:35 EST
Hi, Hu Zheng.

* What about to move zhcon.conf to %{_sysconfdir}?
* The INSTALL file is not needed for %doc, since it's only used when build from
source.
* Correct the BuildRoot tag :
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
* The vendor tag is reserved for Redhat or Fedora Project.
Comment 4 Parag AN(पराग) 2007-02-14 02:19:34 EST
Created attachment 148040 [details]
Corrected some incorrect things in SPEC

Here is some SPEC work for you.
Comment 5 Mamoru TASAKA 2007-02-14 02:49:43 EST
Well,

* Specify the location of the source.
* Don't use "zhcon-0.2.5-to-0.2.6.diff". Please use the
  source 0.2.6 directly.
* The content of zhcon-0.2.6-path.patch is wrong.
------------------------------------------------
+       $(INSTALL_DATA) $(srcdir)/zhcon.conf $(DESTDIR)$(prefix)/etc/zhcon.conf
------------------------------------------------
  - The location of $(prefix)/etc/zhcon.conf is not right.
  - Note: the location of conf file is hardcoded.
    From src/zhcon.cpp:
------------------------------------------------
   124      if (access(cfgfile.c_str(), R_OK) != 0)
   125          cfgfile = "/etc/zhcon.conf";
   126  
------------------------------------------------
    Some reviewers say that it would be better to use:
------------------------------------------------
%{__sed} -i -e 's|/etc/zhcon.conf|%{_sysconfdir}/zhcon.conf|' \
      src/zhcon.cpp
------------------------------------------------
    to use rpm macro correctly.
  - And.. please avoid to use autotools as much as possible.
    i.e. when it is possible to apply a patch against not
    Makefile.am but Makefile.in, please make a patch for
    Makefile.in and don't call automake etc.

For chown, I will check later.
Comment 6 Hu Zheng 2007-02-14 03:11:21 EST
I have updated the files, you can download them again.

The author changed the file path from /etc/zhcon.conf to PREFIX
"/etc/zhcon.conf", I don't know why him change this.

zhcon need the 4755 permission to access some devices.

The author didn't release a 0.2.6 source tarball, only the patch is provided.

Thanks everyone for concerning this :)
Comment 7 Mamoru TASAKA 2007-02-14 03:41:52 EST
(In reply to comment #6)
> I have updated the files, you can download them again.

Umm.. where?
Note: please bump the release number every time you 
      fix the spec file.

* chown
> zhcon need the 4755 permission to access some devices.
  - I checked the spec from Parag, still failing mockbuild on
    FC7 i386.
    Well, src/Makefile.in still says:
---------------------------------------
install-exec-local:
        chmod 4755 $(bindir)/zhcon
---------------------------------------
    It seems that automake is not called recursively.
    So please apply a patch for Makefile.in.
* %attr
  - And use %attr for binaries which needs setuid/setgid bits.
    Unless using %attr, rpmbuild removes the setuid/setgid bits
    on creating rpm.
- dist tag
  Using dist tag %{?dist} makes it easier to manage spec files
  on different branches and this is recommended.
  http://fedoraproject.org/wiki/Packaging/DistTag

- quiet setup
  - setup is not quiet. Please use "%setup -q"
  - and please make it quite to expand files from tarball
   i.e. Don't use "zxvf" for tar. and please use "zxf".
Comment 8 Hu Zheng 2007-02-14 05:05:34 EST
Here is the newest version:
http://reciteword.cosoft.org.cn/redhat/zhcon.spec
http://reciteword.cosoft.org.cn/redhat/zhcon-0.2.6-1.src.rpm

The main problem is mock didn't pass. But it is OK on my system, so I
think patch the Makefile.in is not the solution. The problem should be
some things are lacked in Buildrequires, I doubt it is intltool etc.,
which make automake failed.

Any one can help me to figure it out?

I can't install mock presently as it need 10G disk space, which I don't have
presently, I will try it on another machine.
Comment 9 Miao ZhiCheng 2007-02-14 05:23:44 EST
Created attachment 148044 [details]
I have a spec of zhcon myself, and it used in fedora-cn.
You can try the attachment.
In this spec, I use autoreconf to reconf the autotool stuff, it works in fedora-cn's chroot build(not mock, but alike)
Comment 10 Miao ZhiCheng 2007-02-14 05:27:36 EST
Comment on attachment 148044 [details]
I have a spec of zhcon myself, and it used in fedora-cn.
You can try the attachment.
In this spec, I use autoreconf to reconf the autotool stuff, it works in fedora-cn's chroot build(not mock, but alike)

I have a spec of zhcon myself, and it used in fedora-cn.
You can try the attachment.
In this spec, I use autoreconf to reconf the autotool stuff, it works in
fedora-cn's chroot build(not mock, but alike)
Comment 11 Mamoru TASAKA 2007-02-14 13:21:17 EST
Umm??

I saw that you added this package to SyncNeeded, however
no one approved this package yet...
Mockbuild still fails and some fixes is needed.

Note: Please increase the release number each time you modify
      your spec file (and add some description to %changlog
      accordingly). Creating new srpm/spec without release
      number changed causes confusion on the people who are
      checking the package...
Comment 13 Parag AN(पराग) 2007-02-16 01:13:35 EST
Mamoru,
  Your SRPM is working fine. But what about rpmlint errors coming on binary RPM?
Comment 14 Mamoru TASAKA 2007-02-16 01:23:01 EST
(In reply to comment #13)
> Mamoru,
>   Your SRPM is working fine. But what 
> about rpmlint errors coming on binary RPM?

Perhaps you are referring to the following?
E: zhcon setuid-binary /usr/bin/zhcon root 04755
E: zhcon non-standard-executable-perm /usr/bin/zhcon 04755

This is because zhcon binary has setuid bit.
Zheng (who is the submitter) explained this briefly
(In reply to comment #6)
> zhcon need the 4755 permission to access some devices.
I don't know the details of this package, however, it seems
that the right to access some device files under /dev is
needed for this binary.
Comment 15 Mamoru TASAKA 2007-02-16 01:28:41 EST
Notes:
There are some applications which deals with multibyte
characters on CUI.

* bogl-bterm (maintained Miloslav Trmac) dropped setuid
  bits on /usr/bin/bterm, so currently only root can
  use this.
* jfbterm (maintained by me) also remoded setuid bits,
  however console.perms file is introduced by the original
  maintainer (outside Fedora). Currently root or the first
  person who logged in to CUI can use jfbterm
* kon2 (was maintained by Akira Tagoh, however kon2 was
  dropped... I don't know the reason) used setuid bits
  on /usr/bin/kon2.
Comment 16 Mamoru TASAKA 2007-02-17 02:38:15 EST
Zheng, would you check my spec/srpm?
Comment 17 Miao ZhiCheng 2007-02-17 03:17:52 EST
Hi Tasaka, I've test your SRPM in FC6. Mock build was success, and it works
under framebuffer.
But I have some suggestion on the setuid excutable program. Setuid is generally
a bad idea. This program needs setuid bit just to access /dev/fb(under
framebuffer) or /dev/mem(under vga mode). So I recommend that we leave the
policy to user : they can be set group of /dev/fb,/dev/mem properly by udev or
just set sudo if they know what it means.

B.T.W : This is Chinese New Year recently. Don't know how long Hu will be
absent. But also Happy Chinese New Year to you all :D
Comment 18 Mamoru TASAKA 2007-02-17 08:56:05 EST
(In reply to comment #17)
> Hi Tasaka, I've test your SRPM in FC6. Mock build was success, and it works
> under framebuffer.
Thanks.

> So I recommend that we leave the
> policy to user : 
I leave this as how Hu thinks of this.
Comment 19 Hu Zheng 2007-02-25 00:43:42 EST
I think setuid is not a big problem, it is convenience from user's aspect, which
just run and work fine.

I think this can be the final version.
Comment 20 Mamoru TASAKA 2007-02-25 11:23:42 EST
(In reply to comment #19)
 
> I think this can be the final version.
This refers to my spec/srpm (comment 12)? If so, I changed the
directories where the files are installed according to FHS and
something else.

conf: /usr/etc -> /etc
data: /usr/lib -> /usr/share/
(check: zhcon-0.2.6-path-define.patch)
So for this you have to write README.fedora for fedora specific
issue so that the user of fedora version zhcon can find the 
files which are expected to be installed by zhcon correctly.

Comment 21 Hu Zheng 2007-02-26 00:35:02 EST
Yes, I mean the file in comment 12.
It is good to change the file path to /etc and /usr/share, but this should won't
affect users much.
Comment 22 Mamoru TASAKA 2007-02-26 01:26:22 EST
Well, then would you recheck my spec/srpm, add some fixes
if you want and resubmit (with the release number changed to
integer)? After that I will re-review your (originally my)
spec/srpm...
Comment 23 Hu Zheng 2007-02-26 01:51:00 EST
OK, here are them:
http://reciteword.cosoft.org.cn/redhat/zhcon.spec
http://reciteword.cosoft.org.cn/redhat/zhcon-0.2.6-3.src.rpm

rpmlint is fine except setuid warning.

I just updated the release interger.
Comment 24 Mamoru TASAKA 2007-02-27 02:00:44 EST
Well,

* Documentaion
  - The following documents are encoded in non-UTF8 coding. Please
    change to UTF-8
-------------------------------------------------------
ChangeLog      ISO-8859-1
-------------------------------------------------------
   - The following documents may be useful and can be included as
     %doc ?
-------------------------------------------------------
README.utf8
doc/README.html
-------------------------------------------------------
   - Some documents are for Chinese users. Please mark the documents
     as %lang(zh_??) %doc ...... (I don't know the different between
     traditional and simplified Chinese).

Well as you need a sponsor, you have to follow 
http://fedoraproject.org/wiki/Extras/HowToGetSponsored
As written as
--------------------------------------------------------
The best ways for you to illustrate your understanding of 
the packaging guidelines are to submit quality packages 
and to assist with package reviews.
--------------------------------------------------------

Usually:
- If there are some other review requests you have already
  sumbitted, I may judge if I can sponsor you by checking
  other review requests of you.
- If not (i.e. this is the only package you sumbitted for now),
  you have to do a pre-review of other review requests.

So, as it seems that currently this is a only package you
are to maintain, would you do a pre-review of other person's
review requests? The review requests which are still waiting
for someone to review can be found from:
https://bugzilla.redhat.com/bugzilla/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&component=Package+Review&component_text=&query_format=advanced&bug_status=NEW&bug_status=VERIFIED&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=CLOSED&bug_status=NEEDINFO&bug_status=MODIFIED&bug_status=ON_DEV&bug_status=ON_QA&bug_status=FAILS_QA&bug_status=RELEASE_PENDING&bug_status=POST&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&fixed_in_type=allwordssubstr&fixed_in=&qa_whiteboard_type=allwordssubstr&qa_whiteboard=&keywords_type=allwords&keywords=&emailassigned_to1=1&emailtype1=exact&email1=&emailassigned_to2=1&emailreporter2=1&emailqa_contact2=1&emailcc2=1&emailtype2=exact&email2=&bugidtype=include&bug_id=&votes=&changedin=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=short_desc&type0-0-0=notsubstring&value0-0-0=Merge&field1-0-0=assigned_to&type1-0-0=equals&value1-0-0=nobody%40fedoraproject.org&field2-0-0=bug_status&type2-0-0=notequals&value2-0-0=CLOSED
Comment 25 Hu Zheng 2007-02-27 04:05:13 EST
Updated:
http://reciteword.cosoft.org.cn/redhat/zhcon.spec
http://reciteword.cosoft.org.cn/redhat/zhcon-0.2.6-3.src.rpm

I didn't change the release number for clean.

ChangeLog converted to UTF-8, README.utf8 and doc/README.html added, %lang tag
added.

I already get sponsored, but I will try to review some other packages as your
suggestion :)

Thank you!
Comment 26 Mamoru TASAKA 2007-03-11 12:02:06 EDT
ping?
Comment 27 Hu Zheng 2007-03-12 00:38:30 EDT
What should we do next?
Comment 28 Mamoru TASAKA 2007-03-12 01:04:01 EDT
Well, according to your comment;

(In reply to comment #25)
> I already get sponsored, but I will try to review some other packages as your
> suggestion :)
I was expecting that you would try to pre-review some other packages.
Comment 29 Mamoru TASAKA 2007-03-23 03:57:07 EDT
Hello, Zhu.

This bug still block FE-NEEDSPONSOR, however according
to your comment, are you already sponsored??
Comment 30 Hu Zheng 2007-03-23 04:33:14 EDT
I have already get sponsored. I have reviewed the wqy-bitmapfont package too.
Have the review get past? If so, we can add the fedora-cvs tag.
Comment 31 Mamoru TASAKA 2007-03-23 04:41:17 EDT
The okay.

---------------------------------------------------
    This package (zhcon) is APPROVED by me.
---------------------------------------------------
Comment 32 Josh Boyer 2007-03-23 06:46:56 EDT
Please use the CVS request template found here:

http://fedoraproject.org/wiki/PackageMaintainers/CVSAdminProcedure

And reset the fedora-cvs flag with an entry using that.
Comment 33 Hu Zheng 2007-03-26 00:33:21 EDT
New Package CVS Request
=======================
Package Name: zhcon
Short Description: A Fast Console CJK System Using FrameBuffer
Owners: zhu@redhat.com
Branches: FC-6 
InitialCC: 
Comment 34 Jens Petersen 2007-03-26 03:24:50 EDT
I suggest removing the following part of the description before importing:
"It can also use input methods(table based) from M$ pwin98 and
UCDOS for M$-DOG."

Since setuid was dropped from bogl and jfterm, it might be worth discussing
it on the fedora-maintainers or fedora-devel list before building?
Comment 35 Jens Petersen 2007-04-10 02:28:43 EDT
Discussion about the setuid issue:
https://www.redhat.com/archives/fedora-security-list/2007-April/msg00004.html
Comment 36 Jens Petersen 2007-04-10 02:44:05 EDT
A bit late now but I suggest replacing "CJK" with "Chinese".

Note You need to log in before you can comment on or make changes to this bug.