Re: [gentoo-user] which lenovo or huawei laptop?

2022-04-07 Thread Daniel Frey

On 2022-04-06 11:53, n952162 wrote:
I bought a bottom of the line HP laptop and had only problems with 
unsupported chips.  I'd like to buy a lenovo or huawei now. Has anyone 
had bad experiences porting /gentoo/ to either?




I bought a Lenovo P70 laptop back in 2018? and all hardware was 
supported by the kernel. This wasn't a cheap laptop though, it set me 
back about $2400.


Dan



Re: [gentoo-user] Brother HL-L6200DW

2022-04-07 Thread thelma

On 4/6/22 19:10, tastytea wrote:

On 2022-04-06 19:05-0600 the...@sys-concept.com wrote:


On 4/6/22 16:43, P Levine wrote:

On Wed, Apr 6, 2022 at 3:40 PM mailto:the...@sys-concept.com>> wrote:

 Does anybody have this printer?

 Is there a driver in overlay to setup this printer?

 Installing those drivers from rpm and cupswrapper is tiring.

I have a different brother printer but I used an ebuild from
brother-overlay
 as a
template. The closest to your printer would likely be
brother-hll8350cdw-bin-1.1.2-r1.ebuild
.
Rename to brother-hl6200dw-bin-1.1.2-r1.ebuild. Change the parts of
SRC_URI to match the download URI used to download the driver(s)
from the Brother website. Change instances of "hll8350cdw" to
"hll6200dw".


This is a good idea. I've the files (modified them):
brother-hl6200dw-bin-1.1.2-r1.ebuild and metadata.xml

My only question is which directory to put them in? I think:
/usr/local/portage/(something)


That's described in
. In short:
eselect repository create 



I just tired generic brother printer and it works perfectly.
emerge --ask net-print/brother-genml1-bin
 
No need to complicate installation of specific driver.




[gentoo-user] Program: Python C Header file Generator for GNU C

2022-04-07 Thread Attila Boczkó
Dear Gentoo Users, Developers!

I would like to share my little program that does header file generation
from GNU C file.

See attached file.

Sincerely xbx.
#!/usr/bin/env python


import os
import sys
import re
import shutil
import datetime


class ConfigMain(object):
def __init__(self):
self.confStrfTime = "%Y_%m_%d__%H_%M_%S"
self.mainOutputDir = "Header-OLD-Saved"
# Dictionary Keys for the Read Director class
self.dictKeyDataHolderFileNameCode = 'codefileName'
self.dictKeyDataHolderFilePathCode = 'codefilePath'
self.dictKeyDataHolderFileNameHeader = 'headerFileName'
self.dictKeyDataHolderFilePathHeader = 'headerFilePath'
self.configDictKeyVoid = "FunctionVoid"
self.configDictKeyChar = "FunctionChar"
self.configDictKeyInteger = "FunctionInteger"
self.configDictKeyStruct = "FunctionStruct"
self.configDictKeyCustom = "FunctionCustom"
# file extension
self.configFileExtensionHeader = ".h"
self.configFileExtensionC = ".c"



class FileContentReader(object):
def __init__(self):
self.__fileName = None
self.__fileHandler = None
self.__fileData = None

def __openFile(self):
try:
print("Reading file: {0}".format(self.__fileName))
self.__fileHandler = open(self.__fileName, "r")
except OSError as exc:
print("Exception reading C File: {0}.Exception was: {1}"
  .format(self.__fileName, exc))
sys.exit(1)

def readDataWholeFile(self, fileNameCCode):
self.__fileName = fileNameCCode
self.__openFile()
try:
self.__fileData = self.__fileHandler.readlines()
self.__fileHandler.close()
self.__fileHandler = None
return self.__fileData
except OSError as exc:
print("Exception Occured reading file: {0}. Exception was: {1}"
  .format(self.__fileName, exc))
sys.exit(2)

def __del__(self):
if self.__fileHandler is not None:
self.__fileHandler.close()


class HeaderFileContentWriter(object):
def __init__(self):
self.__fileHandlerWrite = None

def openFileWrite(self, fileNameWrite):
try:
self.__fileHandlerWrite = open(fileNameWrite, "w")
except OSError as exc:
print("Exception occured: {0}".format(exc))

def writeOutData(self, writeData):
try:
self.__fileHandlerWrite.write(writeData)
self.__fileHandlerWrite.flush()
self.__fileHandlerWrite.close()
self.__fileHandlerWrite = None
except OSError as exc:
print("Exception occured: {0}".format(exc))

def __del__(self):
if self.__fileHandlerWrite is not None:
self.__fileHandlerWrite.flush()
self.__fileHandlerWrite.close()


class HeaderFileContentGenerator(object):
def __init__(self):
self.__headerFileName = None
self.__headerFileExtension = ".h"
self.__definePre = "#ifndef "
self.__defineDefine = "#define "
self.__defineEnd = "#endif"
self.__define_H_end = "_H__"
self.__define_H_start = "__"
self.__stringBuilderStart = ""
self.__stringBuilderEnd = ""
self.__stringBuilderFunctionAll = ""
# function String buffers
self.__stringBufferVoid = ""
self.__stringBufferInteger = ""
self.__stringBufferChar = ""
self.__stringBufferStruct = ""
# The Whole file String
self.__functionListVoid = list()
self.__functionListInteger = list()
self.__functionListChar = list()
self.__functionListStruct = list()
self.__dataHolderBuildedStrings = ""

def setVariableFileNameHeader(self, fileNameHeader):
self.__headerFileName = fileNameHeader

def setVariableFunctionListVoid(self, functionListVoid):
if functionListVoid is not None:
self.__functionListVoid = functionListVoid

def setVariableFunctionListInteger(self, functionListInteger):
if functionListInteger is not None:
self.__functionListInteger = functionListInteger

def setVariableFunctionListChar(self, functionListChar):
if functionListChar is not None:
self.__functionListChar = functionListChar

def setVariableFunctionListStruct(self, functionListStruct):
if functionListStruct is not None:
self.__functionListStruct = functionListStruct

def preGenerateStartDefine(self):
includeHeader = ""
fileNameWithoutExtension = self.__headerFileName.rstrip(
self.__headerFileExtension)
uppperCaseHeaderFileName = fileNameWithoutExtension.upper()
#print("Header include file: {0}".format(uppperCaseHeaderFileName))
self.__stringBuilderStart += self.__definePre
includeHeader += 

Re: [gentoo-user] LVM and the /usr Logical Volume

2022-04-07 Thread Neil Bothwick
On Tue, 5 Apr 2022 20:25:09 -0400, dhk wrote:

> The issue is the /usr logical volume is not mounted as expected. After 
> booting without the livecd:
>    * The df -h command show /usr on /dev/dm-1 and not 
> /dev/mapper/vg0-usr like the in the fstab.
>    * My expectation is it should follow the other LVs (home, var, opt, 
> vm) and be in the vg0 Volume Group on /dev/mapper .
>    * However the mount /usr command indicates that it is mounted 
> correctly:  mount: /usr: /dev/mapper/vg0-usr already mounted or mount 
> point busy.
> 
> Is there something off here or is this correct behavior?

> newhost / # ls -l /dev/vg0 /dev/vg1
> /dev/vg0:
> total 0
> lrwxrwxrwx 1 root root 7 Apr  4 03:32 home -> ../dm-3
> lrwxrwxrwx 1 root root 7 Apr  4 03:32 opt -> ../dm-4
> lrwxrwxrwx 1 root root 7 Apr  4 03:32 *usr -> ../dm-1  # This looks
> right.* lrwxrwxrwx 1 root root 7 Apr  4 03:32 var -> ../dm-2

/dev/mapper/vg0-usr and /dev/dm-1 are the same device, so nothing is
actually wrong, this is more a cosmetic issue. You are mounting the
correct device, it is just showing as a different name.

I suspect the initramfs here, what does the fstab inside that look like?

How are you creating the initramfs? Genkernel, dracut, home brewed?


-- 
Neil Bothwick

The word 'Windows' is a word out of an old dialect of the Apaches.
It means: 'White man staring through glass-screen onto an hourglass...')


pgp1iI3KkbTTK.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] Re: LVM and the /usr Logical Volume

2022-04-07 Thread Wols Lists

On 07/04/2022 05:00, John Covici wrote:

Are you using systemd or openrc?  What are you using for your initrd,
dracut or something else?  I also wonder if dm1 is the same thing as
your/dev/mapper/... by another name -- check where the link points
to.


If it isn't, then there's something wrong. You should be using 
/dev/mapper/..., which should be a link to whatever device is underlying 
it. /dev/dm-1 will be whatever devicemapper brought up as the first 
device it found.


Cheers,
Wol